]> git.proxmox.com Git - vzctl.git/blame - debian/patches/fix-init.d-depends.diff
do not start any VEs with openvz init script
[vzctl.git] / debian / patches / fix-init.d-depends.diff
CommitLineData
5259aa6b
DM
1Index: new/etc/init.d/vz-redhat.in
2===================================================================
dfb1259f 3--- new.orig/etc/init.d/vz-redhat.in 2012-02-10 06:40:03.000000000 +0100
14b4928c 4+++ new/etc/init.d/vz-redhat.in 2012-04-20 09:20:53.000000000 +0200
5259aa6b
DM
5@@ -25,8 +25,8 @@
6
7 ### BEGIN INIT INFO
8 # Provides: vz
9-# Required-start: $network $remote_fs $syslog
10-# Required-stop: $network $remote_fs $syslog
dfb1259f
DM
11+# Required-Start: +iscsi pve-cluster cman clvm $network $local_fs $remote_fs $syslog
12+# Required-Stop: +iscsi pve-cluster cman clvm $network $local_fs $remote_fs $syslog
5259aa6b
DM
13 # Should-Start: sshd vzeventd
14 # Should-Stop: sshd vzeventd
15 # Default-Start: 2 3 4 5
dfb1259f
DM
16@@ -40,6 +40,7 @@
17
18 . @VZLIBDIR@/initd-functions
19
20+PVECTL=/usr/bin/pvectl
21 VZQUOTA=@SBINDIR@/vzquota
22 CONFIG_DIR=@VPSCONFDIR@
23 LOCKFILE=$VARLOCK/vz_lock
24@@ -270,10 +271,17 @@
25 local msg
26 local need_restart
27
28+ sysctl -q -w net.ipv4.route.src_check=0
29+
30+ if [ -x ${PVECTL} ]; then
14b4928c 31+ # pve-manager should start the containers
dfb1259f
DM
32+ return;
33+ fi
34+
35 need_restart=""
36 velist=$(vzlist -aH -octid,onboot -s-bootorder |
37 awk '$2 == "yes" {print $1}')
38- sysctl -q -w net.ipv4.route.src_check=0
39+
40 for veid in $velist; do
41 [ "${veid}" = "0" ] && continue
42 __echo "Starting CT ${veid}: "