Synopsis
no-nag [OPTIONS]…
Options
- -t FILE
-
Target source FILE to patch. Must be one of the default locations. All patches for this target will be applied. Can be specified only once.
- -a
-
Autorun mode - NOT permitted to run unless allowed by configuration. Backup copies will be given .original extension instead of .bak. Verbose user notices suppressed.
Arguments
No arguments are supported. All known patch targets will be scanned for presence and patched unless used with -t option.
Configuration
The following sole file is sourced for option variables:
- /etc/free-pmx/no-subscription.conf
-
Shared configuration file. File can be pre-created before package install to avoid default behaviour during first install.
no-subscription.conf
All option names are uppercase, values lowercase. There must NO WHITESPACE between option name, =
sign and the assigned value.
- FREE_PMX_NO_NAG=VALUE
-
Determines when and how the notice can be removed.
- auto
-
Notice is removed upon install and whenever the offending source file is brought in via Proxmox package upgrades.
- manual
-
Notice can ONLY be removed by invoking the command, i.e. it may reappear upon upgrades.
- prohibit
-
Notice will NOT be removed and the command invocation will reject removal.
Operation
A series of patch definitions are applied on each relevant source file. A search’n’replace-like algorithm unrelated to the diff-style patching is involved. This allows the application to be idempotent and the actual patch definitions are designed to fail gracefully - also the case for when underlying source files will have changed in the future.
Patching targets the actual visual elements, i.e. it does NOT create any faux subscription or alter the API behaviour. Accordingly, if patches are applied only to some of the hosts (e.g. only some cluster members), others are not affected and unless required, do not need patching at all - in which case they will continue providing the stock experience.
Files
Patches are staggered per each target file. An attempt to create a backup copy prior to first patch of a series is made, however the patching WILL proceed regardless if backup could have been made.
- Targeted source files that may be patched, depending on product:
-
-
/usr/share/javascript/proxmox-widget-tool‐kit/proxmoxlib.js
-
/usr/share/pve-manager/js/pvemanagerlib.js
-
/usr/share/javascript/proxmox-backup/js/proxmox-backup-gui.js
-
/usr/share/javascript/pmg-gui/js/pmgmanagerlib.js
-
Depending on automated or manual invocation, either .original or .bak extension (respectively) is added. The backup file will be OVERWRITTEN if it already exists.
Note
|
It is thus possible to lose the actual unpatched version if invoked repeatedly when the patch (series) had been already applied. This is more common for manual invocation of the command, but can also occur during free-pmx package install or upgrades. |
- Difference between different versions can be verified with a diff:
-
diff -u FILE{.original,}
Reversal
- The original (default) version can be restored by reinstall of the Proxmox package that it belongs to, e.g.:
-
apt reinstall PACKAGE
- The actual PACKAGE a file belongs to can be queried:
-
dpkg -S FILE
Note
|
If FREE_PMX_NO_NAG is configured to auto, such reinstalled version will be instantly put aside as .original file. It is therefore necessary to either set this to manual or prohibit. |
Exit status
- 0
-
Success. Includes scenarios, such as:
-
patching is prohibited by configuration; or
-
backup copies could not be created.
Also returned when any of the applied patches has NOT resulted in any original source file change.
-
- 1
-
Failure. Issues encountered, such as:
-
invalid options or arguments provided; or
-
no file to patch present; or
-
could not determine if patch resulted in modification of the original file.
-
Copying
Copyright © 2025 free-pmx.
Free use of this software is granted under the terms of the AGPL v3 License.