You've already forked Proxmox-Widget-Toolkit-Wrapper
Inital Commit
This commit is contained in:
21
root/usr/lib/proxmox-widget-toolkit/proxmox-no-subscription
Normal file
21
root/usr/lib/proxmox-widget-toolkit/proxmox-no-subscription
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
|
||||
###
|
||||
#
|
||||
# Runtime Environment
|
||||
#
|
||||
###
|
||||
|
||||
if ! /usr/bin/sed --quiet '/checked_command: function (orig_cmd) {/,/Proxmox.Utils.API2Request/p' '/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js' | \
|
||||
/usr/bin/grep --quiet 'return;'; then
|
||||
/usr/bin/sed --in-place \
|
||||
'/checked_command: function (orig_cmd) {/a\ return;' \
|
||||
'/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'
|
||||
fi
|
||||
/usr/bin/sed --in-place \
|
||||
"s/return 'no-repo';/return 'non-production';/g" \
|
||||
'/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'
|
||||
/usr/bin/sed --in-place \
|
||||
"/!enterprise && !nosubscription && !test/,/);/s/addCritical/addWarn/; /No {0} repository is enabled, you do not get any updates!/s/No {0} repository is enabled, you do not get any updates!/The {0}test repository may pull in unstable updates and is not recommended for production use!/" \
|
||||
'/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'
|
||||
Reference in New Issue
Block a user