rhel: Automatically start openvswitch service before bringing an ovs interface up...
authorThomas Graf <tgraf@redhat.com>
Fri, 25 Jan 2013 14:06:57 +0000 (15:06 +0100)
committerBen Pfaff <blp@nicira.com>
Fri, 25 Jan 2013 23:24:14 +0000 (15:24 -0800)
This patch modifies the ifup/ifdown scripts to automatically
start the openvswitch service before ovs-vsctl is invoked thus
not making it mandatory to auto-start openvswitch on boot.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
rhel/etc_sysconfig_network-scripts_ifdown-ovs
rhel/etc_sysconfig_network-scripts_ifup-ovs

diff --git a/AUTHORS b/AUTHORS
index fa5efed..165fd5a 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -65,6 +65,7 @@ Simon Horman            horms@verge.net.au
 Tadaaki Nagao           nagao@stratosphere.co.jp
 Tetsuo NAKAGAWA         nakagawa@mxc.nes.nec.co.jp
 Thomas Goirand          zigo@debian.org
+Thomas Graf             tgraf@redhat.com
 Thomas Lacroix          thomas.lacroix@citrix.com
 Todd Deshane            deshantm@gmail.com
 Tom Everman             teverman@google.com
index 19047d8..d2a2f4b 100755 (executable)
@@ -34,6 +34,8 @@ if [ ! -x ${OTHERSCRIPT} ]; then
     OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-eth"
 fi
 
+[ -f /var/lock/subsys/openvswitch ] || /sbin/service openvswitch start
+
 case "$TYPE" in
        OVSBridge)
                ${OTHERSCRIPT} ${CONFIG} $2
index c427879..61b0af9 100755 (executable)
@@ -34,6 +34,8 @@ if [ ! -x ${OTHERSCRIPT} ]; then
        OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-eth"
 fi
 
+[ -f /var/lock/subsys/openvswitch ] || /sbin/service openvswitch start
+
 case "$TYPE" in
        OVSBridge)
                ovs-vsctl -t ${TIMEOUT} -- --may-exist add-br "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}