Skip to content

fix unattended upgrades#217

Merged
Marketen merged 1 commit intomasterfrom
marc/fix-unattended
May 6, 2026
Merged

fix unattended upgrades#217
Marketen merged 1 commit intomasterfrom
marc/fix-unattended

Conversation

@Marketen
Copy link
Copy Markdown
Contributor

@Marketen Marketen commented May 6, 2026

This pull request refactors the unattended upgrades script to better support both Debian and Ubuntu by introducing distribution-specific configuration blocks for unattended upgrades. The script now detects the Linux distribution and applies the correct configuration format, improving compatibility and maintainability.

Distribution-specific unattended upgrades configuration:

  • Added separate unattended-upgrades configuration blocks for Debian (debian_unattended_upgrades_origins) and Ubuntu (ubuntu_unattended_upgrades_origins), using the correct Origins-Pattern syntax for each distro.

  • Introduced the set_unattended_upgrades_config_for_distro function, which detects the distro via /etc/os-release and sets the appropriate configuration. If the distro is unsupported or unknown, the script logs a warning and skips configuration changes.

Script logic and maintainability improvements:

  • Updated the main script logic to call set_unattended_upgrades_config_for_distro and only write the unattended-upgrades config file if the function succeeds, preventing accidental misconfiguration on unsupported systems.

  • Removed the old, hardcoded unattended_upgrades_config block in favor of the new, distro-specific approach, and separated common options into unattended_upgrades_options for reuse.

@Marketen Marketen requested a review from a team as a code owner May 6, 2026 10:10
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Dappnode bot has built and pinned the built packages to an IPFS node, for commit: 1a65321

This is a development version and should only be installed for testing purposes.

  1. Package core.dnp.dappnode.eth

Install link

Hash: /ipfs/QmdL3zYGvTEvvFTaGrToPQWqBuboyTDxRTTiXXTo81BtRz

(by dappnodebot/build-action)

@Marketen Marketen merged commit 2c59d1c into master May 6, 2026
2 checks passed
@Marketen Marketen deleted the marc/fix-unattended branch May 6, 2026 11:41
@Marketen Marketen mentioned this pull request May 6, 2026
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.

1 participant