1 From: Scott Leggett <scott@sl.id.au>
2 Date: Sun, 5 Nov 2017 15:11:51 +1100
3 Subject: Patch .service files for Debian.
6 redhat/bgpd.service | 6 ++++--
7 redhat/isisd.service | 6 ++++--
8 redhat/nhrpd.service | 6 ++++--
9 redhat/ospf6d.service | 6 ++++--
10 redhat/ospfd.service | 6 ++++--
11 redhat/pimd.service | 14 +++++++++-----
12 redhat/ripd.service | 6 ++++--
13 redhat/ripngd.service | 6 ++++--
14 redhat/zebra.service | 10 ++++++++--
15 9 files changed, 45 insertions(+), 21 deletions(-)
17 diff --git a/redhat/bgpd.service b/redhat/bgpd.service
18 index ef24841..f1ddfd9 100644
19 --- a/redhat/bgpd.service
20 +++ b/redhat/bgpd.service
21 @@ -5,11 +5,13 @@ Wants=network.target
22 After=zebra.service network-pre.target
24 ConditionPathExists=/etc/quagga/bgpd.conf
25 +Documentation=man:bgpd
29 -EnvironmentFile=/etc/sysconfig/quagga
30 -ExecStart=/usr/sbin/bgpd -d $BGPD_OPTS -f /etc/quagga/bgpd.conf
31 +ExecStartPre=-/bin/chmod -f 640 /etc/quagga/bgpd.conf
32 +ExecStartPre=-/bin/chown -f quagga:quagga /etc/quagga/bgpd.conf
33 +ExecStart=/usr/sbin/bgpd -d -A 127.0.0.1 -f /etc/quagga/bgpd.conf
37 diff --git a/redhat/isisd.service b/redhat/isisd.service
38 index edb6eea..a16b2f8 100644
39 --- a/redhat/isisd.service
40 +++ b/redhat/isisd.service
41 @@ -5,11 +5,13 @@ Wants=network.target
42 After=zebra.service network-pre.target
44 ConditionPathExists=/etc/quagga/isisd.conf
45 +Documentation=man:isisd
49 -EnvironmentFile=/etc/sysconfig/quagga
50 -ExecStart=/usr/sbin/isisd -d $ISISD_OPTS -f /etc/quagga/isisd.conf
51 +ExecStartPre=-/bin/chmod -f 640 /etc/quagga/isisd.conf
52 +ExecStartPre=-/bin/chown -f quagga:quagga /etc/quagga/isisd.conf
53 +ExecStart=/usr/sbin/isisd -d -A 127.0.0.1 -f /etc/quagga/isisd.conf
57 diff --git a/redhat/nhrpd.service b/redhat/nhrpd.service
58 index 63f138c..15680e8 100644
59 --- a/redhat/nhrpd.service
60 +++ b/redhat/nhrpd.service
61 @@ -5,11 +5,13 @@ Wants=network.target
62 After=zebra.service network-pre.target
64 ConditionPathExists=/etc/quagga/nhrpd.conf
65 +Documentation=man:nhrpd
69 -EnvironmentFile=/etc/sysconfig/quagga
70 -ExecStart=/usr/sbin/nhrpd -d $NHRPD_OPTS -f /etc/quagga/nhrpdd.conf
71 +ExecStartPre=-/bin/chmod -f 640 /etc/quagga/nhrpd.conf
72 +ExecStartPre=-/bin/chown -f quagga:quagga /etc/quagga/nhrpd.conf
73 +ExecStart=/usr/sbin/nhrpd -d -A 127.0.0.1 -f /etc/quagga/nhrpd.conf
77 diff --git a/redhat/ospf6d.service b/redhat/ospf6d.service
78 index b53b970..c883e5c 100644
79 --- a/redhat/ospf6d.service
80 +++ b/redhat/ospf6d.service
81 @@ -5,11 +5,13 @@ Wants=network.target
82 After=zebra.service network-pre.target
84 ConditionPathExists=/etc/quagga/ospf6d.conf
85 +Documentation=man:ospf6d
89 -EnvironmentFile=/etc/sysconfig/quagga
90 -ExecStart=/usr/sbin/ospf6d -d $OSPF6D_OPTS -f /etc/quagga/ospf6d.conf
91 +ExecStartPre=-/bin/chmod -f 640 /etc/quagga/ospf6d.conf
92 +ExecStartPre=-/bin/chown -f quagga:quagga /etc/quagga/ospf6d.conf
93 +ExecStart=/usr/sbin/ospf6d -d -A ::1 -f /etc/quagga/ospf6d.conf
97 diff --git a/redhat/ospfd.service b/redhat/ospfd.service
98 index 5d6c5bb..57b3bee 100644
99 --- a/redhat/ospfd.service
100 +++ b/redhat/ospfd.service
101 @@ -5,11 +5,13 @@ Wants=network.target
102 After=zebra.service network-pre.target
103 Before=network.target
104 ConditionPathExists=/etc/quagga/ospfd.conf
105 +Documentation=man:ospfd
109 -EnvironmentFile=/etc/sysconfig/quagga
110 -ExecStart=/usr/sbin/ospfd -d $OSPFD_OPTS -f /etc/quagga/ospfd.conf
111 +ExecStartPre=-/bin/chmod -f 640 /etc/quagga/ospfd.conf
112 +ExecStartPre=-/bin/chown -f quagga:quagga /etc/quagga/ospfd.conf
113 +ExecStart=/usr/sbin/ospfd -d -A 127.0.0.1 -f /etc/quagga/ospfd.conf
117 diff --git a/redhat/pimd.service b/redhat/pimd.service
118 index d62fe64..b2d33f3 100644
119 --- a/redhat/pimd.service
120 +++ b/redhat/pimd.service
123 Description=PIM multicast routing engine
124 -BindTo=zebra.service
125 -After=syslog.target network.target zebra.service
126 +BindsTo=zebra.service
127 +Wants=network.target
128 +After=zebra.service network-pre.target
129 +Before=network.target
130 ConditionPathExists=/etc/quagga/pimd.conf
131 +Documentation=man:pimd
135 -EnvironmentFile=/etc/sysconfig/quagga
136 -ExecStart=/usr/sbin/pimd -d $PIMD_OPTS -f /etc/quagga/pimd.conf
137 +ExecStartPre=-/bin/chmod -f 640 /etc/quagga/pimd.conf
138 +ExecStartPre=-/bin/chown -f quagga:quagga /etc/quagga/pimd.conf
139 +ExecStart=/usr/sbin/pimd -d -A 127.0.0.1 -f /etc/quagga/pimd.conf
143 -WantedBy=network.target
144 +WantedBy=multi-user.target
145 diff --git a/redhat/ripd.service b/redhat/ripd.service
146 index ed7f922..d6290e0 100644
147 --- a/redhat/ripd.service
148 +++ b/redhat/ripd.service
149 @@ -5,11 +5,13 @@ Wants=network.target
150 After=zebra.service network-pre.target
151 Before=network.target
152 ConditionPathExists=/etc/quagga/ripd.conf
153 +Documentation=man:ripd
157 -EnvironmentFile=/etc/sysconfig/quagga
158 -ExecStart=/usr/sbin/ripd -d $RIPD_OPTS -f /etc/quagga/ripd.conf
159 +ExecStartPre=-/bin/chmod -f 640 /etc/quagga/ripd.conf
160 +ExecStartPre=-/bin/chown -f quagga:quagga /etc/quagga/ripd.conf
161 +ExecStart=/usr/sbin/ripd -d -A 127.0.0.1 -f /etc/quagga/ripd.conf
165 diff --git a/redhat/ripngd.service b/redhat/ripngd.service
166 index 2519b31..2e4ccb8 100644
167 --- a/redhat/ripngd.service
168 +++ b/redhat/ripngd.service
169 @@ -5,11 +5,13 @@ Wants=network.target
170 After=zebra.service network-pre.target
171 Before=network.target
172 ConditionPathExists=/etc/quagga/ripngd.conf
173 +Documentation=man:ripngd
177 -EnvironmentFile=/etc/sysconfig/quagga
178 -ExecStart=/usr/sbin/ripngd -d $RIPNGD_OPTS -f /etc/quagga/ripngd.conf
179 +ExecStartPre=-/bin/chmod -f 640 /etc/quagga/ripngd.conf
180 +ExecStartPre=-/bin/chown -f quagga:quagga /etc/quagga/ripngd.conf
181 +ExecStart=/usr/sbin/ripngd -d -A ::1 -f /etc/quagga/ripngd.conf
185 diff --git a/redhat/zebra.service b/redhat/zebra.service
186 index f9107f1..39080a0 100644
187 --- a/redhat/zebra.service
188 +++ b/redhat/zebra.service
189 @@ -4,13 +4,19 @@ Wants=network.target
190 Before=network.target
191 After=network-pre.target
192 ConditionPathExists=/etc/quagga/zebra.conf
193 +Documentation=man:zebra
197 -EnvironmentFile=-/etc/sysconfig/quagga
198 ExecStartPre=/sbin/ip route flush proto zebra
199 -ExecStart=/usr/sbin/zebra -d $ZEBRA_OPTS -f /etc/quagga/zebra.conf
200 +ExecStartPre=-/bin/chmod -f 640 /etc/quagga/vtysh.conf /etc/quagga/zebra.conf
201 +ExecStartPre=-/bin/chown -f quagga:quagga /etc/quagga/zebra.conf
202 +ExecStartPre=-/bin/chown -f quagga:quaggavty /etc/quagga/vtysh.conf
203 +ExecStart=/usr/sbin/zebra -d -A 127.0.0.1 -f /etc/quagga/zebra.conf
205 +RuntimeDirectory=quagga
206 +RuntimeDirectoryMode=775
210 WantedBy=multi-user.target