Skip to content

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

@ngadmini

Description

@ngadmini

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions