Skip to content

Conversation

@MickLesk
Copy link
Member

@MickLesk MickLesk commented Dec 5, 2025

✍️ Description

1.) replaces bash with sh for container execution in fix_gpu_gids and updates device matching logic to use a POSIX-compliant case statement. This improves compatibility with containers that may not have bash installed.

2.) reconfigure dpkg if there are wrong apt packages after OS upgrade

🔗 Related PR / Issue

Link: #9664 #9663

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

Replaces bash with sh for container execution in fix_gpu_gids and updates device matching logic to use a POSIX-compliant case statement. This improves compatibility with containers that may not have bash installed.
@github-actions github-actions bot added core update script A change that updates a script labels Dec 5, 2025
When a previous installation is interrupted (e.g., by script error or
user cancellation), dpkg can be left in an inconsistent state requiring
'dpkg --configure -a' to fix.

This change:
- Adds dpkg --configure -a check to ensure_apt_working()
- Adds dpkg --configure -a to retry logic in install_packages_with_retry()
- Adds dpkg --configure -a to retry logic in upgrade_packages_with_retry()

Fixes: Omada Controller update failing after interrupted installation
Reported-in: #9663
@MickLesk MickLesk added the bugfix label Dec 5, 2025
@MickLesk MickLesk marked this pull request as ready for review December 5, 2025 08:17
@MickLesk MickLesk requested a review from a team as a code owner December 5, 2025 08:17
@MickLesk MickLesk merged commit e73f35e into main Dec 5, 2025
2 checks passed
probers1 pushed a commit to probers1/ProxmoxVE that referenced this pull request Dec 5, 2025
)

* Switch container exec from bash to sh in fix_gpu_gids

Replaces bash with sh for container execution in fix_gpu_gids and updates device matching logic to use a POSIX-compliant case statement. This improves compatibility with containers that may not have bash installed.

* fix(apt): auto-recover from interrupted dpkg operations

When a previous installation is interrupted (e.g., by script error or
user cancellation), dpkg can be left in an inconsistent state requiring
'dpkg --configure -a' to fix.

This change:
- Adds dpkg --configure -a check to ensure_apt_working()
- Adds dpkg --configure -a to retry logic in install_packages_with_retry()
- Adds dpkg --configure -a to retry logic in upgrade_packages_with_retry()

Fixes: Omada Controller update failing after interrupted installation
Reported-in: community-scripts#9663
@MickLesk MickLesk deleted the core_fixes branch December 8, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix core update script A change that updates a script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants