Skip to content

fix: run apt non-interactively during installation#44

Merged
mrrobot47 merged 1 commit into
masterfrom
fix/noninteractive-apt
Jun 15, 2026
Merged

fix: run apt non-interactively during installation#44
mrrobot47 merged 1 commit into
masterfrom
fix/noninteractive-apt

Conversation

@mrrobot47

Copy link
Copy Markdown
Member

What

Set DEBIAN_FRONTEND=noninteractive and NEEDRESTART_MODE=a at the top of setup.sh so every apt-get call in the installer — and in the sourced functions — runs without prompting.

Why

Unattended installs (cloud-init, CI, config-management tooling) can stall when apt or needrestart tries to open an interactive prompt and there's no TTY to answer it. Setting the non-interactive frontend up front keeps package installation fully headless.

Notes

  • Exports live in setup.sh so they apply before bootstrap() and propagate to the sourced functions, covering all package installs in one place.
  • No behavioural change for interactive installs.

Export DEBIAN_FRONTEND=noninteractive and NEEDRESTART_MODE=a so package installs and service-restart checks never block on an interactive prompt during an unattended setup.
@mrrobot47 mrrobot47 merged commit df79243 into master Jun 15, 2026
1 check passed
@mrrobot47 mrrobot47 deleted the fix/noninteractive-apt branch June 15, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to make the installer reliably headless by preventing apt/dpkg from showing interactive debconf or needrestart prompts that can stall unattended runs (cloud-init/CI/config-management), by setting non-interactive environment variables early in setup.sh.

Changes:

  • Export DEBIAN_FRONTEND=noninteractive globally for the installer run.
  • Export NEEDRESTART_MODE=a globally for the installer run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread setup.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants