don't use /var/lock/subsys with systemd (#1006412)

f38
Flavio Leitner 12 years ago
parent ae96785656
commit 791d6d224c

@ -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)

@ -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

@ -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

@ -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 <fbl@redhat.com> - 1.11.0-3
- don't use /var/lock/subsys with systemd (#1006412)
* Thu Sep 19 2013 Flavio Leitner <fbl@redhat.com> - 1.11.0-2
- ovsdbmonitor package is optional

Loading…
Cancel
Save