Fix update-rc.d invocations.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 21 Sep 2010 13:38:14 +0000 (13:38 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 21 Sep 2010 13:38:14 +0000 (13:38 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2915 94cd875c-1c1d-0410-91d2-eb244daf1a30

debian/util-vserver-legacy.postinst
debian/util-vserver-legacy.prerm
debian/util-vserver-sysv.postinst
debian/util-vserver-sysv.postrm
debian/util-vserver-sysv.prerm

index 3d98fba..f57bbae 100755 (executable)
@@ -1,9 +1,12 @@
 #!/bin/sh
 
 if test "$1" = configure; then
-    update-rc.d rebootmgr start 98 2 3 4 5 stop 02 0 1 6 .
-    update-rc.d vservers-legacy start 98 2 3 4 5 stop 02 0 1 6 .
+    update-rc.d rebootmgr start 98 2 3 4 5 .
+    update-rc.d rebootmgr stop 02 0 1 6 .
+    update-rc.d vservers-legacy start 98 2 3 4 5 .
+    update-rc.d vservers-legacy stop 02 0 1 6 .
     for i in httpd named portmap sendmail smb sshd xinetd gated; do
-       update-rc.d v_$i start 98 2 3 4 5 stop 02 0 1 6 .
+       update-rc.d v_$i start 98 2 3 4 5 .
+        update-rc.d v_$i stop 02 0 1 6 .
     done
 fi
index 6e54d47..fe88094 100755 (executable)
@@ -1,10 +1,8 @@
 #!/bin/sh
 
 if test "$1" = remove; then
-    /etc/init.d/rebootmgr stop > /dev/null 2>&1
-    update-rc.d rebootmgr remove
-    update-rc.d vservers-legacy remove
+    /etc/init.d/rebootmgr stop >/dev/null 2>&1 || :
     for i in httpd named portmap sendmail smb sshd xinetd gated; do
-       update-rc.d v_$i remove
+       /etc/init.d/v_$i stop >/dev/null 2>&1 || :
     done
 fi
index 21bd69c..c3c6e51 100755 (executable)
@@ -1,7 +1,10 @@
 #!/bin/sh
 
 if test "$1" = configure; then
-    update-rc.d vservers-default start 98 2 3 4 5 stop 02 0 1 6 .
-    update-rc.d vprocunhide start 26 2 3 4 5 stop 74 0 1 6 .
-    update-rc.d util-vserver start 10 2 3 4 5 stop 90 0 1 6 .
+    update-rc.d vservers-default start 98 2 3 4 5 .
+    update-rc.d vservers-default stop 02 0 1 6 .
+    update-rc.d vprocunhide start 26 2 3 4 5 .
+    update-rc.d vprocunhide stop 74 0 1 6 .
+    update-rc.d util-vserver start 10 2 3 4 5 .
+    update-rc.d util-vserver stop 90 0 1 6 .
 fi
index 8d1bed8..74bb80a 100755 (executable)
@@ -3,3 +3,9 @@
 if test "$1" = upgrade; then
     /etc/init.d/vprocunhide condrestart > /dev/null 2>&1
 fi
+
+if test "$1" = purge; then
+    update-rc.d vprocunhide remove
+    update-rc.d util-vserver remove
+    update-rc.d vservers-default remove
+fi
index 83dd404..1904384 100755 (executable)
@@ -2,7 +2,4 @@
 
 if test "$1" = remove; then
     /etc/init.d/vprocunhide stop > /dev/null 2>&1
-    update-rc.d vprocunhide remove
-    update-rc.d util-vserver remove
-    update-rc.d vservers-default remove
 fi