Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proxmox VE] pve-manager 7.2-11/b76d3178 with proxmox-widget-toolkit 3.5.1 #9

Open
ngadmini opened this issue Nov 9, 2022 · 3 comments

Comments

@ngadmini
Copy link

ngadmini commented Nov 9, 2022

hey @cptsk1ttles
FYI, it's not work on pve-manager 7.2-11/b76d3178 with proxmox-widget-toolkit 3.5.1. CHANGE pve-nag-buster.sh at line 22 and 28-32 OR create new maybe will fixing this issue on pve-manager 7.2-11/b76d3178 with proxmox-widget-toolkit 3.5.1 :

Change pve-nag-buster.sh at lines (22 and 28-32) :

NAGTOKEN="data.status.toLowerCase() !== 'active'"
                <--slice-->
if grep -qs "$NAGTOKEN" "$NAGFILE" > /dev/null 2>&1; then
  echo "$SCRIPT: Removing Nag ..."
  sed -i.orig "s/$NAGTOKEN/false/g" "$NAGFILE"
  systemctl restart pveproxy.service
fi

To :

  1. sed -i '22s/^/# /' pve-nag-buster.sh to change line 22

  2. following this to change lines 28-32 :

:<<'comment'
if grep -qs "$NAGTOKEN" "$NAGFILE" > /dev/null 2>&1; then
  echo "$SCRIPT: Removing Nag ..."
  sed -i.orig "s/$NAGTOKEN/false/g" "$NAGFILE"
  systemctl restart pveproxy.service
fi
comment
if grep '^//.*\({\|res\)$' "${NAGFILE}" >> /dev/null 2>&1; then
   printf "[INFO] %s has been modified. exiting ...\n\n" "${NAGFILE##*/}"
else
   printf "\n[INFO] starting %s to Removing Nag ...\n" "${0##*/}"
   mapfile -t ar_num < <(grep -PnA1 -B1 '^\t.*.toLowerCase.*{$' "${NAGFILE}" | awk -F'-|:' '{print $1}')
   x="${ar_num[0]}"; y="${ar_num[1]}"; z="${ar_num[2]}"
   sed -i.dpkg-dist "${x},${y}s/^/\/\//;${z} i \\\t\t\tif (false) {" "${NAGFILE}"
   printf "[INFO] %s has been modified at line %s-%s\n" "${NAGFILE##*/}" "${x}" "${z}"
   printf "[HINT] please check: ~ nano +%s %s\n" "${x}" "${NAGFILE}"
   printf "[INFO] restarting pveproxy.service ...\n"
   systemctl restart pveproxy.service
   printf "[DONE] please try login to %s\n\n" "$(hostname -I | sed 's/ $/:8006/')"
   unset -v ar_num
fi

Or change target:

use /usr/share/perl5/PVE/API2/Subscription.pm instead of /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js via apt invocation :

~# echo "DPkg::Post-Invoke { \"sed -i 's/notfound/active/' /usr/share/perl5/PVE/API2/Subscription.pm\"; }" \
| tee -a /etc/apt/apt.conf.d/99pve-API2Subs-hook
DPkg::Post-Invoke { "sed -i 's/notfound/active/' /usr/share/perl5/PVE/API2/Subscription.pm"; }
~# sed -i '1i \/\/ remove naging proxmox subscription message' /etc/apt/apt.conf.d/99pve-API2Subs-hook
~# apt install --reinstall proxmox-widget-toolkit
~# apt-config dump | grep notfound
DPkg::Post-Invoke:: "sed -i 's/notfound/active/' /usr/share/perl5/PVE/API2/Subscription.pm";

Or :

completly replace pve-nag-buster.sh with this one

regards,
ngadmini

@IgorIsaiasBanlian
Copy link

IgorIsaiasBanlian commented Nov 15, 2022

Please, make your script work on PBS (Proxmox Backup Server) 2.3-2.

@ngadmini
Copy link
Author

Please, make your script work on PBS (Proxmox Backup Server) 2.2-1.

Sorry, I don't have PBS

@oskardotglobal
Copy link

Tested on PVE 7.3-3, works fine. I will test it on PBS and report back

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

No branches or pull requests

3 participants