From 305987a6f9c6aa25c5e3c08c31ffc0bec2ca177c Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Mon, 28 Jul 2025 13:48:56 +0200 Subject: [PATCH] Fix no-subscription-hack --- postinstall | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/postinstall b/postinstall index 96e468a..0cac6e0 100755 --- a/postinstall +++ b/postinstall @@ -262,10 +262,16 @@ suppress_no_subscription_warning(){ if [ $suppress_warning -gt 0 ]; then cat << EOF > /usr/local/bin/suppress_no_subscription_warning #!/bin/bash -# Proxmox no-subsscription hack +# Proxmox no-subscription hack filename=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js +# Prüfe, ob checked_command bereits im gewünschten Zustand ist +if grep -q 'checked_command: function(orig_cmd) { orig_cmd(); },' "\$filename"; then + echo "checked_command bereits gepatcht, keine Änderung notwendig." + exit 0 +fi + # Finde die erste Zeile mit checked_command first_line=\$(grep -n -m1 'checked_command' "\$filename" | cut -d':' -f1) # Hole die Einrückung der Startzeile