[PR #6084] [MERGED] Fixed nag script on ProxMox 8.4.5 #6350

Open
opened 2025-11-20 07:10:12 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/6084
Author: @imcrazytwkr
Created: 7/19/2025
Status: Merged
Merged: 7/19/2025
Merged by: @tremor021

Base: mainHead: fix-no-nag


📝 Commits (1)

  • 696c077 Fixed nag script on ProxMox 8.4.5

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tools/pve/post-pve-install.sh (+1 -1)

📄 Description

✍️ Description

Fixed current implementation of anti-nag hook for PVE post-install script.

Additional notes:

  • I couldn't find a single reason for the | grep -q '/proxmoxlib\.js$' part to be useful since dpkg -V doesn't print you the list of files and even when it does print an error message, it does so in stderr where grep can't read it. Figured a simple stderr redirection to /dev/null would do the trick well enough and it did. This, in turn, allowed for a complete removal of piping, which then lets us chain all the commands using && to ensure that everything is successful and add an additional file presence check.
  • I've also updated the sed invocation to replace ! with a = instead of just removing it because otherwise if proxmox ships a version of a script that uses non-strict inequality check (!=), current command within the scipt would make the nag screen appear even for those who do have an active subscription as it would rewrite check to an assignment which returns the value thad had been assigned to the variable.

I've tested it on 8.4.0, 8.4.1 and 8.4.5 versions of ProxMox and it works as expected everywhere.

ℹ️ Notice

This fix will only work after fresh installations and only on the first run of post-pve-install.sh until the proper solution for propagating this fix to existing users if solved in #6087. Users of existing installations should manually remove the /etc/apt/apt.conf.d/no-nag-script hook before re-running the post-install script to install the fixed version.

Link: #6078

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/6084 **Author:** [@imcrazytwkr](https://github.com/imcrazytwkr) **Created:** 7/19/2025 **Status:** ✅ Merged **Merged:** 7/19/2025 **Merged by:** [@tremor021](https://github.com/tremor021) **Base:** `main` ← **Head:** `fix-no-nag` --- ### 📝 Commits (1) - [`696c077`](https://github.com/community-scripts/ProxmoxVE/commit/696c077c583f14af046cd4f17356c1019c5c638e) Fixed nag script on ProxMox 8.4.5 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/pve/post-pve-install.sh` (+1 -1) </details> ### 📄 Description ## ✍️ Description Fixed current implementation of anti-nag hook for PVE post-install script. Additional notes: - I couldn't find a single reason for the `| grep -q '/proxmoxlib\.js$'` part to be useful since `dpkg -V` doesn't print you the list of files and even when it does print an error message, it does so in `stderr` where grep can't read it. Figured a simple stderr redirection to `/dev/null` would do the trick well enough and it did. This, in turn, allowed for a complete removal of piping, which then lets us chain all the commands using `&&` to ensure that everything is successful and add an additional file presence check. - I've also updated the sed invocation to replace `!` with a `=` instead of just removing it because otherwise if proxmox ships a version of a script that uses non-strict inequality check (`!=`), current command within the scipt would make the nag screen appear even for those who do have an active subscription as it would rewrite check to an assignment which returns the value thad had been assigned to the variable. I've tested it on 8.4.0, 8.4.1 and 8.4.5 versions of ProxMox and it works as expected everywhere. ## ℹ️ Notice This fix will only work after fresh installations and only on the first run of `post-pve-install.sh` until the proper solution for propagating this fix to existing users if solved in #6087. Users of existing installations should manually remove the `/etc/apt/apt.conf.d/no-nag-script` hook before re-running the post-install script to install the fixed version. ## 🔗 Related PR / Issue Link: #6078 ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [x] 🐞 **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. - [x] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 07:10:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#6350