source: systemd-units/Makefile@ af8e1cb5

systemd-11177
Last change on this file since af8e1cb5 was af8e1cb5, checked in by Krejzi <krejzi@…>, 10 years ago

Convert iptables, firewall section and haveged to systemd. Remove network service files from systemd-units.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@13509 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 13.5 KB
Line 
1SHELL=/bin/bash
2
3EXTDIR=${DESTDIR}/etc
4DEFAULTSDIR=${DESTDIR}/etc/default
5SERVICEDIR=${DESTDIR}/lib/services
6TMPFILESDIR=${DESTDIR}/usr/lib/tmpfiles.d
7UNITSDIR=${DESTDIR}/lib/systemd/system
8MODE=755
9DIRMODE=755
10CONFMODE=644
11
12all:
13 @grep "^install" Makefile.systemd | cut -d ":" -f 1
14 @echo "Select an appropriate install target from the above list"
15
16create-dirs:
17 install -d -m ${DIRMODE} ${DEFAULTSDIR}
18 install -d -m ${DIRMODE} ${TMPFILESDIR}
19 install -d -m ${DIRMODE} ${UNITSDIR}
20
21create-service-dir:
22 install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
23 install -d -m ${DIRMODE} ${SERVICEDIR}
24
25install-service-dhclient: create-service-dir
26 install -m ${MODE} blfs/services/dhclient ${SERVICEDIR}
27
28install-service-dhcpcd: create-service-dir
29 install -m ${MODE} blfs/services/dhcpcd ${SERVICEDIR}
30
31install-service-bridge: create-service-dir
32 install -m ${MODE} blfs/services/bridge ${SERVICEDIR}
33
34install-service-wpa: create-service-dir
35 install -m ${MODE} blfs/services/wpa ${SERVICEDIR}
36
37install-acpid: create-dirs
38 install -m ${CONFMODE} blfs/units/acpid.service ${UNITSDIR}/
39 install -m ${CONFMODE} blfs/units/acpid.socket ${UNITSDIR}/
40 systemctl enable acpid.socket
41
42install-dhcpd: create-dirs
43 install -m ${CONFMODE} blfs/default/dhcpd ${DEFAULTSDIR}/
44 install -m ${CONFMODE} blfs/units/dhcpd.service ${UNITSDIR}/
45 systemctl enable dhcpd.service
46
47install-exim: create-dirs
48 install -m ${CONFMODE} blfs/units/exim.service ${UNITSDIR}/
49 systemctl enable exim.service
50
51install-git: create-dirs
52 install -m ${CONFMODE} blfs/units/git-daemonat.service ${UNITSDIR}/git-daemon@.service
53 install -m ${CONFMODE} blfs/units/git-daemon.socket ${UNITSDIR}/
54 systemctl enable git-daemon.socket
55
56install-gpm: create-dirs
57 install -m ${CONFMODE} blfs/units/gpm.service ${UNITSDIR}/
58 systemctl enable gpm.service
59
60install-haveged: create-dirs
61 install -m ${CONFMODE} blfs/units/haveged.service ${UNITSDIR}/
62 systemctl enable haveged.service
63
64install-httpd: create-dirs
65 install -m ${CONFMODE} blfs/tmpfiles/httpd.conf ${TMPFILESDIR}/
66 install -m ${CONFMODE} blfs/units/httpd.service ${UNITSDIR}/
67 systemd-tmpfiles --create httpd.conf
68 systemctl enable httpd.service
69
70install-iptables: create-dirs
71 install -m ${CONFMODE} blfs/units/iptables.service ${UNITSDIR}/
72 systemctl enable iptables.service
73
74install-kdm: create-dirs
75 install -m ${CONFMODE} blfs/units/kdm.service ${UNITSDIR}/
76 systemctl enable kdm.service
77
78install-krb5: create-dirs
79 install -m ${CONFMODE} blfs/units/krb5-kdc.service ${UNITSDIR}/
80 install -m ${CONFMODE} blfs/units/krb5-kpropd.service ${UNITSDIR}/
81 install -m ${CONFMODE} blfs/units/krb5-kadmind.service ${UNITSDIR}/
82 systemctl enable krb5-kdc.service
83 systemctl enable krb5-kpropd.service
84 systemctl enable krb5-kadmind.service
85
86install-mysqld: create-dirs
87 install -m ${CONFMODE} blfs/tmpfiles/mysqld.conf ${TMPFILESDIR}/
88 install -m ${CONFMODE} blfs/units/mysqld.service ${UNITSDIR}/
89 systemd-tmpfiles --create mysqld.conf
90 systemctl enable mysqld.service
91
92install-named: create-dirs
93 install -m ${CONFMODE} blfs/tmpfiles/named.conf ${TMPFILESDIR}/
94 install -m ${CONFMODE} blfs/units/named.service ${UNITSDIR}/
95 systemd-tmpfiles --create named.conf
96 systemctl enable named.service
97
98install-nfs-client: create-dirs
99 install -m ${CONFMODE} blfs/default/nfs-utils ${DEFAULTSDIR}/
100 install -m ${CONFMODE} blfs/units/rpc-statd.service ${UNITSDIR}/
101 install -m ${CONFMODE} blfs/units/nfs-client.target ${UNITSDIR}/
102 systemctl enable rpc-statd.service
103
104install-nfs-server: install-nfs-client
105 install -m ${CONFMODE} blfs/units/nfsd.service ${UNITSDIR}/
106 install -m ${CONFMODE} blfs/units/rpc-mountd.service ${UNITSDIR}/
107 install -m ${CONFMODE} blfs/units/nfs-server.target ${UNITSDIR}/
108 install -m ${CONFMODE} blfs/units/proc-fs-nfsd.mount ${UNITSDIR}/
109 systemctl enable nfsd.service
110 systemctl enable rpc-mountd.service
111
112install-ntpd: create-dirs
113 install -m ${CONFMODE} blfs/units/ntpd.service ${UNITSDIR}/
114 install -d -m ${DIRMODE} ${DESTDIR}/usr/lib/systemd/ntp-units.d
115 echo "ntpd.service" > ${DESTDIR}/usr/lib/systemd/ntp-units.d/ntp.list
116 systemctl enable ntpd.service
117
118install-postfix: create-dirs
119 install -m ${CONFMODE} blfs/units/postfix.service ${UNITSDIR}/
120 systemctl enable postfix.service
121
122install-postgresql: create-dirs
123 install -m ${CONFMODE} blfs/tmpfiles/postgresql.conf ${TMPFILESDIR}/
124 install -m ${CONFMODE} blfs/units/postgresql.service ${UNITSDIR}/
125 systemd-tmpfiles --create postgresql.conf
126 systemctl enable postgresql.service
127
128install-proftpd: create-dirs
129 install -m ${CONFMODE} blfs/units/proftpd.service ${UNITSDIR}/
130 systemctl enable proftpd.service
131
132install-rpcbind: create-dirs
133 install -m ${CONFMODE} blfs/units/rpcbind.service ${UNITSDIR}/
134 systemctl enable rpcbind.service
135
136install-rsyncd: create-dirs
137 install -m ${CONFMODE} blfs/units/rsyncd.service ${UNITSDIR}/
138 install -m ${CONFMODE} blfs/units/rsyncdat.service ${UNITSDIR}/rsyncd@.service
139 install -m ${CONFMODE} blfs/units/rsyncd.socket ${UNITSDIR}/
140 systemctl enable rsyncd.service
141
142install-samba: create-dirs
143 install -m ${CONFMODE} blfs/default/samba ${DEFAULTSDIR}/
144 install -m ${CONFMODE} blfs/tmpfiles/samba.conf ${TMPFILESDIR}/
145 install -m ${CONFMODE} blfs/units/nmbd.service ${UNITSDIR}/
146 install -m ${CONFMODE} blfs/units/smbd.service ${UNITSDIR}/
147 install -m ${CONFMODE} blfs/units/smbdat.service ${UNITSDIR}/smbd@.service
148 install -m ${CONFMODE} blfs/units/smbd.socket ${UNITSDIR}/
149 systemd-tmpfiles --create samba.conf
150 systemctl enable nmbd.service
151 systemctl enable smbd.service
152
153install-saslauthd: create-dirs
154 install -m ${CONFMODE} blfs/default/saslauthd ${DEFAULTSDIR}/
155 install -m ${CONFMODE} blfs/tmpfiles/saslauthd.conf ${TMPFILESDIR}/
156 install -m ${CONFMODE} blfs/units/saslauthd.service ${UNITSDIR}/
157 systemd-tmpfiles --create saslauthd.conf
158 systemctl enable saslauthd.service
159
160install-sendmail: create-dirs
161 install -m ${CONFMODE} blfs/default/sendmail ${DEFAULTSDIR}/
162 install -m ${CONFMODE} blfs/units/sm-client.service ${UNITSDIR}/
163 install -m ${CONFMODE} blfs/units/sendmail.service ${UNITSDIR}/
164 systemctl enable sendmail.service
165
166install-slapd: create-dirs
167 install -m ${CONFMODE} blfs/default/slapd ${DEFAULTSDIR}/
168 install -m ${CONFMODE} blfs/tmpfiles/slapd.conf ${TMPFILESDIR}/
169 install -m ${CONFMODE} blfs/units/slapd.service ${UNITSDIR}/
170 systemd-tmpfiles --create slapd.conf
171 systemctl enable slapd.service
172
173install-sshd: create-dirs
174 install -m ${CONFMODE} blfs/units/sshd.service ${UNITSDIR}/
175 install -m ${CONFMODE} blfs/units/sshdat.service ${UNITSDIR}/sshd@.service
176 install -m ${CONFMODE} blfs/units/sshd.socket ${UNITSDIR}/
177 systemctl enable sshd.service
178
179install-svnserve: create-dirs
180 install -m ${CONFMODE} blfs/default/svnserve ${DEFAULTSDIR}/
181 install -m ${CONFMODE} blfs/tmpfiles/svnserve.conf ${TMPFILESDIR}/
182 install -m ${CONFMODE} blfs/units/svnserve.service ${UNITSDIR}/
183 systemd-tmpfiles --create svnserve.conf
184 systemctl enable svnserve.service
185
186install-unbound: create-dirs
187 install -m ${CONFMODE} blfs/units/unbound.service ${UNITSDIR}/
188 systemctl enable unbound.service
189
190install-vsftpd: create-dirs
191 install -m ${CONFMODE} blfs/units/vsftpd.service ${UNITSDIR}/
192 systemctl enable vsftpd.service
193
194install-winbindd: install-samba
195 install -m ${CONFMODE} blfs/units/winbindd.service ${UNITSDIR}/
196 systemctl enable winbindd.service
197
198install-xinetd: create-dirs
199 install -m ${CONFMODE} blfs/units/xinetd.service ${UNITSDIR}/
200 systemctl enable xinetd.service
201
202uninstall-acpid:
203 systemctl stop acpid.service
204 systemctl disable acpid.socket
205 rm -f ${UNITSDIR}/acpid.service ${UNITSDIR}/acpid.socket
206
207uninstall-dhcpd:
208 systemctl stop dhcpd.service
209 systemctl disable dhcpd.service
210 rm -f ${DEFAULTSDIR}/dhcpd ${UNITSDIR}/dhcpd.service
211
212uninstall-exim:
213 systemctl stop exim.service
214 systemctl disable exim.service
215 rm -f ${UNITSDIR}/exim.service
216
217uninstall-git:
218 systemctl stop git-daemon.socket
219 systemctl disable git-daemon.socket
220 rm -f ${UNITSDIR}/git-daemon@.service ${UNITSDIR}/git-daemon.socket
221
222uninstall-gpm:
223 systemctl stop gpm.service
224 systemctl disable gpm.service
225 rm -f ${UNITSDIR}/gpm.service
226
227uninstall-haveged:
228 systemctl stop haveged.service
229 systemctl disable haveged.service
230 rm -f ${UNITSDIR}/haveged.service
231
232uninstall-httpd:
233 systemctl stop httpd.service
234 systemctl disable httpd.service
235 rm -f ${TMPFILESDIR}/httpd.conf ${UNITSDIR}/httpd.service
236
237uninstall-iptables:
238 systemctl disable iptables.service
239 rm -f ${UNITSDIR}/iptables.service
240
241uninstall-kdm:
242 systemctl stop kdm.service
243 systemctl disable kdm.service
244 rm -f ${UNITSDIR}/kdm.service
245
246uninstall-krb5:
247 systemctl stop krb5-kadmind.service
248 systemctl stop krb5-kpropd.service
249 systemctl stop krb5-kdc.service
250 systemctl disable krb5-kadmind.service
251 systemctl disable krb5-kpropd.service
252 systemctl disable krb5-kdc.service
253 rm -f ${UNITSDIR}/krb5-kadmind.service ${UNITSDIR}/krb5-kpropd.service ${UNITSDIR}/krb5-kdc.service
254
255uninstall-mysqld:
256 systemctl stop mysqld.service
257 systemctl disable mysqld.service
258 rm -f ${TMPFILESDIR}/mysqld.conf ${UNITSDIR}/mysqld.service
259
260uninstall-named:
261 systemctl stop named.service
262 systemctl disable named.service
263 rm -f ${TMPFILESDIR}/named.conf ${UNITSDIR}/named.service
264
265uninstall-nfs-client: uninstall-nfs-server
266 systemctl stop rpc-statd.service
267 systemctl disable rpc-statd.service
268 systemctl disable nfs-client.target
269 rm -f ${DEFAULTSDIR}/nfs-utils ${UNITSDIR}/rpc-statd.service
270 rm -f ${UNITSDIR}/nfs-client.target
271
272uninstall-nfs-server:
273 [ -e ${UNITSDIR}/rpc-mountd.service ] && systemctl stop rpc-mountd.service
274 [ -e ${UNITSDIR}/nfsd.service ] && systemctl stop nfsd.service
275 systemctl disable rpc-mountd.service
276 systemctl disable nfsd.service
277 systemctl disable nfs-server.target
278 rm -f ${UNITSDIR}/nfsd.service ${UNITSDIR}/rpc-mountd.service
279 rm -f ${UNITSDIR}/nfs-server.target ${UNITSDIR}/proc-fs-nfsd.mount
280
281uninstall-ntpd:
282 systemctl stop ntpd.service
283 systemctl disable ntpd.service
284 rm -f ${UNITSDIR}/ntpd.service ${DESTDIR}/usr/lib/systemd/ntp-units.d/ntp.list
285
286uninstall-postfix:
287 systemctl stop postfix.service
288 systemctl disable postfix.service
289 rm -f ${UNITSDIR}/postfix.service
290
291uninstall-postgresql:
292 systemctl stop postgresql.service
293 systemctl disable postgresql.service
294 rm -f ${TMPFILESDIR}/postgresql.conf ${UNITSDIR}/postgresql.service
295
296uninstall-proftpd:
297 systemctl stop proftpd.service
298 systemctl disable proftpd.service
299 rm -f ${UNITSDIR}/proftpd.service
300
301uninstall-rpcbind:
302 systemctl stop rpcbind.service
303 systemctl disable rpcbind.service
304 rm -f ${UNITSDIR}/rpcbind.service
305
306uninstall-rsyncd:
307 systemctl stop rsyncd.socket
308 systemctl stop rsyncd.service
309 rm -f ${UNITSDIR}/rsyncd.service ${UNITSDIR}/rsyncd@.service
310 rm -f ${UNITSDIR}/rsyncd.socket
311
312uninstall-samba: uninstall-winbindd
313 systemctl stop smbd.socket
314 systemctl stop smbd.service
315 systemctl stop nmbd.service
316 systemctl disable smbd.socket
317 systemctl disable smbd.service
318 systemctl disable nmbd.service
319 rm -f ${DEFAULTSDIR}/samba ${TMPFILESDIR}/samba.conf ${UNITSDIR}/nmbd.service
320 rm -f ${UNITSDIR}/smbd.service ${UNITSDIR}/smbd@.service ${UNITSDIR}/smbd.socket
321
322uninstall-saslauthd:
323 systemctl stop saslauthd.service
324 systemctl disable saslauthd.service
325 rm -f ${DEFAULTSDIR}/saslauthd ${TMPFILESDIR}/saslauthd.conf ${UNITSDIR}/saslauthd.service
326
327uninstall-sendmail:
328 systemctl stop sendmail.service
329 systemctl disable sendmail.service
330 rm -f ${DEFAULTSDIR}/sendmail ${UNITSDIR}/sm-client.service ${UNITSDIR}/sendmail.service
331
332uninstall-slapd:
333 systemctl stop slapd.service
334 systemctl disable slapd.service
335 rm -f ${DEFAULTSDIR}/slapd ${TMPFILESDIR}/slapd.conf ${UNITSDIR}/slapd.service
336
337uninstall-sshd:
338 systemctl stop sshd.socket
339 systemctl stop sshd.service
340 systemctl disable sshd.socket
341 systemctl disable sshd.service
342 rm -f ${UNITSDIR}/sshd.service ${UNITSDIR}/sshd@.service ${UNITSDIR}/sshd.socket
343
344uninstall-svnserve:
345 systemctl stop svnserve.service
346 systemctl disable svnserve.service
347 rm -f ${DEFAULTSDIR}/svnserve ${TMPFILESDIR}/svnserve.conf ${UNITSDIR}/svnserve.service
348
349uninstall-unbound:
350 systemctl stop unbound.service
351 systemctl disable unbound.service
352 rm -f ${UNITSDIR}/unbound.service
353
354uninstall-vsftpd:
355 systemctl stop vsftpd.service
356 systemctl disable vsftpd.service
357 rm -f ${UNITSDIR}/vsftpd.service
358
359uninstall-winbindd:
360 systemctl stop winbindd.service
361 systemctl disable winbindd.service
362 rm -f ${UNITSDIR}/winbindd.service
363
364uninstall-xinetd:
365 systemctl stop xinetd.service
366 systemctl disable xinetd.service
367 rm -f ${UNITSDIR}/xinetd.service
368
369.PHONY: all create-dirs create-service-dir \
370 install-service-dhclient \
371 install-service-dhcpcd \
372 install-service-bridge \
373 install-service-ipx \
374 install-service-pppoe \
375 install-service-wpa \
376 install-acpid \
377 install-dhcpd \
378 install-exim \
379 install-git \
380 install-gpm \
381 install-httpd \
382 install-iptables \
383 install-kdm \
384 install-krb5 \
385 install-mysqld \
386 install-named \
387 install-nfs-client \
388 install-nfs-server \
389 install-ntp \
390 install-postfix \
391 install-postgresql \
392 install-proftpd \
393 install-rpcbind \
394 install-rsyncd \
395 install-samba \
396 install-saslauthd \
397 install-sendmail \
398 install-slapd \
399 install-sshd \
400 install-svnserve \
401 install-unbound \
402 install-vsftpd \
403 install-winbindd \
404 install-xinetd \
405 uninstall-acpid \
406 uninstall-dhcpd \
407 uninstall-exim \
408 uninstall-git \
409 uninstall-gpm \
410 uninstall-httpd \
411 uninstall-iptables \
412 uninstall-kdm \
413 uninstall-krb5 \
414 uninstall-mysqld \
415 uninstall-named \
416 uninstall-nfs-client \
417 uninstall-nfs-server \
418 uninstall-ntpd \
419 uninstall-postfix \
420 uninstall-postgresql \
421 uninstall-proftpd \
422 uninstall-rpcbind \
423 uninstall-rsyncd \
424 uninstall-samba \
425 uninstall-saslauthd \
426 uninstall-sendmail \
427 uninstall-slapd \
428 uninstall-sshd \
429 uninstall-svnserve \
430 uninstall-unbound \
431 uninstall-vsftpd \
432 uninstall-winbindd \
433 uninstall-xinetd
Note: See TracBrowser for help on using the repository browser.