[pve-devel] [PATCH manager v2 04/17] postinst: purge all old init.d service files on upgrade

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Mar 12 14:13:55 CET 2018


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 debian/postinst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index 23355ebd..534bbc68 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -49,10 +49,11 @@ case "$1" in
 	rm /etc/cron.daily/pve
     fi
 
-    # remove old/usused init.d files
-    rm -f /etc/init.d/pvebanner
-    rm -f /etc/init.d/pvenetcommit
-    rm -f /etc/init.d/pve-manager
+    if dpkg --compare-versions "$2" '<=' '5.1-47'; then
+	# remove old/usused init.d files
+	OLD_INITD_FILES="pvebanner pvenetcommit pve-manager pvedaemon pveproxy pvestatd spiceproxy"
+	for f in ${OLD_INITD_FILES}; do rm -f "/etc/init.d/$f"; done
+    fi
 
     # create new daily randomize update cronjob if not exist
     MIN="$(shuf -i 0-59 -n 1)"
-- 
2.14.2





More information about the pve-devel mailing list