]> git.proxmox.com Git - vzctl.git/blobdiff - debian/patches/fix-init.d-depends.diff
fix bug #128 and #171: use 'pvectl' inside /etc/init.d/vz
[vzctl.git] / debian / patches / fix-init.d-depends.diff
index 779f0a4f7b93ec921f9ca0f1ee152b65350ee6bb..d3d2e87ea25d26e1eb26792058e915a20963888d 100644 (file)
@@ -1,15 +1,54 @@
 Index: new/etc/init.d/vz-redhat.in
 ===================================================================
---- new.orig/etc/init.d/vz-redhat.in   2011-12-07 12:42:45.000000000 +0100
-+++ new/etc/init.d/vz-redhat.in        2011-12-07 12:43:53.000000000 +0100
+--- new.orig/etc/init.d/vz-redhat.in   2012-02-10 06:40:03.000000000 +0100
++++ new/etc/init.d/vz-redhat.in        2012-04-18 10:18:43.000000000 +0200
 @@ -25,8 +25,8 @@
  
  ### BEGIN INIT INFO
  # Provides: vz
 -# Required-start: $network $remote_fs $syslog
 -# Required-stop:  $network $remote_fs $syslog
-+# Required-start: pve-cluster $network $remote_fs $syslog
-+# Required-stop:  pve-cluster $network $remote_fs $syslog
++# Required-Start: +iscsi pve-cluster cman clvm $network $local_fs $remote_fs $syslog
++# Required-Stop:  +iscsi pve-cluster cman clvm $network $local_fs $remote_fs $syslog
  # Should-Start:  sshd vzeventd
  # Should-Stop:  sshd vzeventd
  # Default-Start: 2 3 4 5
+@@ -40,6 +40,7 @@
+ . @VZLIBDIR@/initd-functions
++PVECTL=/usr/bin/pvectl
+ VZQUOTA=@SBINDIR@/vzquota
+ CONFIG_DIR=@VPSCONFDIR@
+ LOCKFILE=$VARLOCK/vz_lock
+@@ -270,10 +271,17 @@
+       local msg
+       local need_restart
++      sysctl -q -w net.ipv4.route.src_check=0
++
++      if [ -x ${PVECTL} ]; then
++          ${PVECTL} startall
++          return;
++      fi
++
+       need_restart=""
+       velist=$(vzlist -aH -octid,onboot -s-bootorder |
+               awk '$2 == "yes" {print $1}')
+-      sysctl -q -w net.ipv4.route.src_check=0
++
+       for veid in $velist; do
+               [ "${veid}" = "0" ] && continue
+               __echo "Starting CT ${veid}: "
+@@ -312,6 +320,11 @@
+       local quota
+       local pids
++      if [ -x ${PVECTL} ]; then
++          ${PVECTL} stopall
++          # fallback to openvz stop script
++      fi
++
+       if get_veinfo; then
+               get_parallel
+               for i in 0 1 2; do