[quagga] systemd: change the WantedBy target
Michal Sekletar
msekleta at fedoraproject.org
Fri Jun 21 18:37:01 UTC 2013
commit fe94d734892b9835bba65bad648e700818902495
Author: Michal Sekletar <msekleta at redhat.com>
Date: Fri Jun 21 20:34:02 2013 +0200
systemd: change the WantedBy target
Previously with configuration WantedBy=network.target it could happen
that after enabling let's say zebra and bgpd and restarting the server
services won't be started. In case when no service pulls in
network.target quagga daemons won't start, because they are enabled
under network.target. This might be the case when only zebra is used
for configuring interfaces and other services like NM and initscripts
are disabled.
This commit also removes ordering dependency on syslog.target, since
this is redundant these days, because systemd-journald is early boot
service.
0001-systemd-change-the-WantedBy-target.patch | 182 +++++++++++++++++++++++++
quagga.spec | 11 ++-
2 files changed, 192 insertions(+), 1 deletions(-)
---
diff --git a/0001-systemd-change-the-WantedBy-target.patch b/0001-systemd-change-the-WantedBy-target.patch
new file mode 100644
index 0000000..f21a4c3
--- /dev/null
+++ b/0001-systemd-change-the-WantedBy-target.patch
@@ -0,0 +1,182 @@
+From 318afd68d26818eff24b3dfe94fa01b8dad873eb Mon Sep 17 00:00:00 2001
+From: Michal Sekletar <msekleta at redhat.com>
+Date: Tue, 11 Jun 2013 19:17:09 +0200
+Subject: [PATCH] systemd: change the WantedBy target
+
+Previously with configuration WantedBy=network.target it could happen
+that after enabling let's say zebra and bgpd and restarting the server
+services won't be started. In case when no service pulls in
+network.target quagga daemons won't start, because they are enabled
+under network.target. This might be the case when only zebra is used
+for configuring interfaces and other services like NM and initscripts
+are disabled.
+
+This commit also removes ordering dependency on syslog.target, since
+this is redundant these days, because systemd-journald is early boot
+service.
+---
+ redhat/babeld.service | 4 ++--
+ redhat/bgpd.service | 4 ++--
+ redhat/isisd.service | 4 ++--
+ redhat/ospf6d.service | 4 ++--
+ redhat/ospfd.service | 4 ++--
+ redhat/ripd.service | 4 ++--
+ redhat/ripngd.service | 4 ++--
+ redhat/zebra.service | 5 +++--
+ 8 files changed, 17 insertions(+), 16 deletions(-)
+
+diff --git a/redhat/babeld.service b/redhat/babeld.service
+index b1ea943..2182de7 100644
+--- a/redhat/babeld.service
++++ b/redhat/babeld.service
+@@ -1,7 +1,7 @@
+ [Unit]
+ Description=Babel routing daemon
+ BindTo=zebra.service
+-After=syslog.target network.target zebra.service
++After=zebra.service
+ ConditionPathExists=/etc/quagga/babeld.conf
+
+ [Service]
+@@ -11,4 +11,4 @@ ExecStart=/usr/sbin/babeld -d $BABELD_OPTS -f /etc/quagga/babeld.conf
+ Restart=on-abort
+
+ [Install]
+-WantedBy=network.target
++WantedBy=multi-user.target
+diff --git a/redhat/bgpd.service b/redhat/bgpd.service
+index 5040284..b48a053 100644
+--- a/redhat/bgpd.service
++++ b/redhat/bgpd.service
+@@ -1,7 +1,7 @@
+ [Unit]
+ Description=BGP routing daemon
+ BindTo=zebra.service
+-After=syslog.target network.target zebra.service
++After=zebra.service
+ ConditionPathExists=/etc/quagga/bgpd.conf
+
+ [Service]
+@@ -11,4 +11,4 @@ ExecStart=/usr/sbin/bgpd -d $BGPD_OPTS -f /etc/quagga/bgpd.conf
+ Restart=on-abort
+
+ [Install]
+-WantedBy=network.target
++WantedBy=multi-user.target
+diff --git a/redhat/isisd.service b/redhat/isisd.service
+index 4cdf67d..d5c2438 100644
+--- a/redhat/isisd.service
++++ b/redhat/isisd.service
+@@ -1,7 +1,7 @@
+ [Unit]
+ Description=IS-IS routing daemon
+ BindTo=zebra.service
+-After=syslog.target network.target zebra.service
++After=zebra.service
+ ConditionPathExists=/etc/quagga/isisd.conf
+
+ [Service]
+@@ -11,4 +11,4 @@ ExecStart=/usr/sbin/isisd -d $ISISD_OPTS -f /etc/quagga/isisd.conf
+ Restart=on-abort
+
+ [Install]
+-WantedBy=network.target
++WantedBy=multi-user.target
+diff --git a/redhat/ospf6d.service b/redhat/ospf6d.service
+index 3c9c466..f9759f5 100644
+--- a/redhat/ospf6d.service
++++ b/redhat/ospf6d.service
+@@ -1,7 +1,7 @@
+ [Unit]
+ Description=OSPF routing daemon for IPv6
+ BindTo=zebra.service
+-After=syslog.target network.target zebra.service
++After=zebra.service
+ ConditionPathExists=/etc/quagga/ospf6d.conf
+
+ [Service]
+@@ -11,4 +11,4 @@ ExecStart=/usr/sbin/ospf6d -d $OSPF6D_OPTS -f /etc/quagga/ospf6d.conf
+ Restart=on-abort
+
+ [Install]
+-WantedBy=network.target
++WantedBy=multi-user.target
+diff --git a/redhat/ospfd.service b/redhat/ospfd.service
+index 5e3de23..c2887e7 100644
+--- a/redhat/ospfd.service
++++ b/redhat/ospfd.service
+@@ -1,7 +1,7 @@
+ [Unit]
+ Description=OSPF routing daemon
+ BindTo=zebra.service
+-After=syslog.target network.target zebra.service
++After=zebra.service
+ ConditionPathExists=/etc/quagga/ospfd.conf
+
+ [Service]
+@@ -11,4 +11,4 @@ ExecStart=/usr/sbin/ospfd -d $OSPFD_OPTS -f /etc/quagga/ospfd.conf
+ Restart=on-abort
+
+ [Install]
+-WantedBy=network.target
++WantedBy=multi-user.target
+diff --git a/redhat/ripd.service b/redhat/ripd.service
+index d35dc47..cc4142a 100644
+--- a/redhat/ripd.service
++++ b/redhat/ripd.service
+@@ -1,7 +1,7 @@
+ [Unit]
+ Description=RIP routing daemon
+ BindTo=zebra.service
+-After=syslog.target network.target zebra.service
++After=zebra.service
+ ConditionPathExists=/etc/quagga/ripd.conf
+
+ [Service]
+@@ -11,4 +11,4 @@ ExecStart=/usr/sbin/ripd -d $RIPD_OPTS -f /etc/quagga/ripd.conf
+ Restart=on-abort
+
+ [Install]
+-WantedBy=network.target
++WantedBy=multi-user.target
+diff --git a/redhat/ripngd.service b/redhat/ripngd.service
+index 567e888..35365e7 100644
+--- a/redhat/ripngd.service
++++ b/redhat/ripngd.service
+@@ -1,7 +1,7 @@
+ [Unit]
+ Description=RIP routing daemon for IPv6
+ BindTo=zebra.service
+-After=syslog.target network.target zebra.service
++After=zebra.service
+ ConditionPathExists=/etc/quagga/ripngd.conf
+
+ [Service]
+@@ -11,4 +11,4 @@ ExecStart=/usr/sbin/ripngd -d $RIPNGD_OPTS -f /etc/quagga/ripngd.conf
+ Restart=on-abort
+
+ [Install]
+-WantedBy=network.target
++WantedBy=multi-user.target
+diff --git a/redhat/zebra.service b/redhat/zebra.service
+index 27c3a52..5b9e454 100644
+--- a/redhat/zebra.service
++++ b/redhat/zebra.service
+@@ -1,6 +1,7 @@
+ [Unit]
+ Description=GNU Zebra routing manager
+-After=syslog.target network.target
++Wants=network.target
++Before=network.target
+ ConditionPathExists=/etc/quagga/zebra.conf
+
+ [Service]
+@@ -11,4 +12,4 @@ ExecStart=/usr/sbin/zebra -d $ZEBRA_OPTS -f /etc/quagga/zebra.conf
+ Restart=on-abort
+
+ [Install]
+-WantedBy=network.target
++WantedBy=multi-user.target
+--
+1.8.1.4
+
diff --git a/quagga.spec b/quagga.spec
index ab7aef1..7be843c 100644
--- a/quagga.spec
+++ b/quagga.spec
@@ -5,7 +5,7 @@
Name: quagga
Version: 0.99.22.1
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Routing daemon
License: GPLv2+
Group: System Environment/Daemons
@@ -23,6 +23,8 @@ Requires(postun): systemd
Provides: routingdaemon = %{version}-%{release}
Obsoletes: quagga-sysvinit
+Patch0: 0001-systemd-change-the-WantedBy-target.patch
+
%define __perl_requires %{SOURCE1}
%description
@@ -58,6 +60,8 @@ developing OSPF-API and quagga applications.
%prep
%setup -q
+%patch0 -p1
+
%build
%configure \
--sysconfdir=%{_sysconfdir}/quagga \
@@ -220,6 +224,11 @@ fi
%{_includedir}/quagga/ospfapi/*.h
%changelog
+* Fri Jun 21 2013 Michal Sekletar <msekleta at redhat.com> - 0.99.22.1-7
+- quagga is service which might implement networking, thus it should not have
+ WantedBy=network.target in its systemd configuration
+- resolves: #976883
+
* Mon Jun 10 2013 Michal Sekletar <msekleta at redhat.com> - 0.99.22.1-6
- obsolete quagga-sysvinit subpackage
- use macro to specify location where to install tmpfiles configuration file
More information about the scm-commits
mailing list