From 670ded5617b70c59bf40a85e88c61db3eac9aa09 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Jul 01 2013 12:55:17 +0000 Subject: Provide native systemd unit files (#818754) Resolves: #818754 --- diff --git a/ifup-ovs b/ifup-ovs index 7ddac02..3386009 100644 --- a/ifup-ovs +++ b/ifup-ovs @@ -55,7 +55,7 @@ done if [ ! -f /var/lock/subsys/openvswitch ]; then if [ -x /usr/bin/systemctl ]; then - /usr/bin/systemctl --ignore-dependencies start openvswitch.service + /usr/bin/systemctl start openvswitch-nonetwork.service else /sbin/service openvswitch start fi diff --git a/openvswitch-nonetwork.service b/openvswitch-nonetwork.service new file mode 100644 index 0000000..e023f04 --- /dev/null +++ b/openvswitch-nonetwork.service @@ -0,0 +1,16 @@ +[Unit] +Description=Open vSwitch Internal Unit +After=syslog.target +PartOf=openvswitch.service + +[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.service b/openvswitch.service index f39d7e6..6e08a9a 100644 --- a/openvswitch.service +++ b/openvswitch.service @@ -1,12 +1,15 @@ [Unit] -Description=Open vSwitch -After=syslog.target network.target +Description=Open vSwitch Unit +After=syslog.target +After=network.target +After=openvswitch-nonetwork.service +Requires=openvswitch-nonetwork.service [Service] Type=oneshot -ExecStart=/usr/share/openvswitch/scripts/openvswitch.init start -ExecStop=/usr/share/openvswitch/scripts/openvswitch.init stop RemainAfterExit=yes +ExecStart=/bin/true +ExecStop=/bin/true [Install] WantedBy=multi-user.target diff --git a/openvswitch.spec b/openvswitch.spec index c5a46fe..d46ca50 100644 --- a/openvswitch.spec +++ b/openvswitch.spec @@ -18,6 +18,7 @@ Source3: openvswitch.logrotate Source4: ifup-ovs Source5: ifdown-ovs Source6: ovsdbmonitor.desktop +Source7: openvswitch-nonetwork.service BuildRequires: systemd-units openssl openssl-devel BuildRequires: python python-twisted-core python-twisted-conch python-zope-interface PyQt4 @@ -97,6 +98,7 @@ dst=$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/openvswitch install -p -D -m 0644 $src $dst install -p -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/openvswitch.service +install -p -D -m 0644 %{SOURCE7} $RPM_BUILD_ROOT%{_unitdir}/openvswitch-nonetwork.service install -p -D -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init install -p -D -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/openvswitch @@ -168,6 +170,7 @@ desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE6} %{_sysconfdir}/sysconfig/network-scripts/ifup-ovs %{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs %{_unitdir}/openvswitch.service +%{_unitdir}/openvswitch-nonetwork.service %{_bindir}/ovs-appctl %{_bindir}/ovs-benchmark %{_bindir}/ovs-dpctl @@ -236,6 +239,7 @@ desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE6} %changelog * Mon Jul 01 2013 Thomas Graf - 1.10.0-2 - Enable PIE (#955181) +- Provide native systemd unit files (#818754) * Tue May 02 2013 Thomas Graf - 1.10.0-1 - Update to 1.10.0 (#958814) diff --git a/sources b/sources index ec2d584..c9cabca 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -e9004202b0e10c0de9870f19d2044f11 openvswitch-1.9.0.tar.gz fe8b49efe9f86b57abab00166b971106 openvswitch-1.10.0.tar.gz