Provide native systemd unit files (#818754)

Resolves: #818754
f38
Thomas Graf 12 years ago
parent 31d9673172
commit 670ded5617

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

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

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

@ -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 <tgraf@redhat.com> - 1.10.0-2
- Enable PIE (#955181)
- Provide native systemd unit files (#818754)
* Tue May 02 2013 Thomas Graf <tgraf@redhat.com> - 1.10.0-1
- Update to 1.10.0 (#958814)

@ -1,2 +1 @@
e9004202b0e10c0de9870f19d2044f11 openvswitch-1.9.0.tar.gz
fe8b49efe9f86b57abab00166b971106 openvswitch-1.10.0.tar.gz

Loading…
Cancel
Save