]> git.proxmox.com Git - pve-access-control.git/blobdiff - debian/postinst
fix #5335: sort ACL entries in user.cfg
[pve-access-control.git] / debian / postinst
index 3dfc19c89959811a9903b6e534781bcd0490c973..ed30455737420290d6c33650dc29dce639920658 100755 (executable)
@@ -6,18 +6,17 @@ set -e
 
 case "$1" in
   configure)
-        # TODO: enable for PVE 6.0
-#    if test -n "$2"; then
-#
-#        # TODO: remove once PVE 7.0 is released
-#        if dpkg --compare-versions "$2" 'lt' '6.0-1'; then
-#            if test ! -e /etc/pve/authkey.pub.old; then
-#                # reset key age to prevent immediate invalidation of all current tickets
-#                touch -d "-2h" /etc/pve/authkey.pub  2>/dev/null || true
-#            fi
-#       fi
-#
-#    fi
+    if test -n "$2"; then
+
+        # TODO: remove once PVE 7.0 is released
+        if dpkg --compare-versions "$2" 'lt' '6.0-0+1'; then
+            if test ! -e /etc/pve/authkey.pub.old; then
+                # reset key age to prevent immediate invalidation of all current tickets
+                touch -d "-2 hours" /etc/pve/authkey.pub || true
+            fi
+       fi
+
+    fi
     ;;
 
 esac