diff --git a/ifdown-ovs b/ifdown-ovs index d2a2f4b..e346f11 100644 --- a/ifdown-ovs +++ b/ifdown-ovs @@ -34,7 +34,15 @@ if [ ! -x ${OTHERSCRIPT} ]; then OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-eth" fi -[ -f /var/lock/subsys/openvswitch ] || /sbin/service openvswitch start +if [ -x /usr/bin/systemctl ]; then + if ! systemctl --quiet is-active openvswitch-nonetwork.service; then + /usr/bin/systemctl start openvswitch-nonetwork.service + fi +else + if [ ! -f /var/lock/subsys/openvswitch ]; then + /sbin/service openvswitch start + fi +fi case "$TYPE" in OVSBridge) diff --git a/ifup-ovs b/ifup-ovs index 3386009..7808ab0 100644 --- a/ifup-ovs +++ b/ifup-ovs @@ -53,11 +53,13 @@ fi fi done -if [ ! -f /var/lock/subsys/openvswitch ]; then - if [ -x /usr/bin/systemctl ]; then +if [ -x /usr/bin/systemctl ]; then + if ! systemctl --quiet is-active openvswitch-nonetwork.service; then /usr/bin/systemctl start openvswitch-nonetwork.service - else - /sbin/service openvswitch start + fi +else + if [ ! -f /var/lock/subsys/openvswitch ]; then + /sbin/service openvswitch start fi fi diff --git a/openvswitch-nonetwork.service b/openvswitch-nonetwork.service index 7da4434..f9fc83d 100644 --- a/openvswitch-nonetwork.service +++ b/openvswitch-nonetwork.service @@ -8,10 +8,7 @@ Wants=openvswitch.service Type=oneshot EnvironmentFile=-/etc/sysconfig/openvswitch RemainAfterExit=yes -ExecStartPost=/usr/bin/touch /var/lock/subsys/openvswitch ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start --system-id=random \ $FORCE_COREFILES $OVSDB_SERVER_PRIORITY $VSWITCHD_PRIORITY \ $VSWITCHD_MLOCKALL $BRCOMPAT $OVS_CTL_OPTS ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop -ExecStopPost=/bin/rm /var/lock/subsys/openvswitch - diff --git a/openvswitch.spec b/openvswitch.spec index 6d5bd20..49b77c0 100644 --- a/openvswitch.spec +++ b/openvswitch.spec @@ -19,7 +19,7 @@ Name: openvswitch Version: 1.11.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open vSwitch daemon/database/utilities # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the @@ -268,6 +268,9 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/ovsdbmonitor %changelog +* Tue Oct 1 2013 Flavio Leitner - 1.11.0-3 +- don't use /var/lock/subsys with systemd (#1006412) + * Thu Sep 19 2013 Flavio Leitner - 1.11.0-2 - ovsdbmonitor package is optional