blob: 820768184bef43101316919a393bc8f1eb6e0f7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
SHELL=/bin/bash
EXTDIR=${DESTDIR}/etc
DEFAULTSDIR=${DESTDIR}/etc/sysconfig
SERVICEDIR=${DESTDIR}/lib/services
TMPFILESDIR=${DESTDIR}/usr/lib/tmpfiles.d
UNITSDIR=${DESTDIR}/lib/systemd/system
MODE=755
DIRMODE=755
CONFMODE=644
all:
@grep "^install" Makefile.systemd | cut -d ":" -f 1
@echo "Select an appropriate install target from the above list"
create-dirs:
install -d -m ${DIRMODE} ${DEFAULTSDIR}
install -d -m ${DIRMODE} ${TMPFILESDIR}
install -d -m ${DIRMODE} ${UNITSDIR}
create-service-dir:
install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
install -d -m ${DIRMODE} ${SERVICEDIR}
install-service-dhclient: create-service-dir
install -m ${MODE} clfs/services/dhclient ${SERVICEDIR}
install-service-dhcpcd: create-service-dir
install -m ${MODE} clfs/services/dhcpcd ${SERVICEDIR}
install-service-bridge: create-service-dir
install -m ${MODE} clfs/services/bridge ${SERVICEDIR}
install-service-wpa: create-service-dir
install -m ${MODE} clfs/services/wpa ${SERVICEDIR}
install-acpid: create-dirs
install -m ${CONFMODE} clfs/units/acpid.service ${UNITSDIR}/
install -m ${CONFMODE} clfs/units/acpid.socket ${UNITSDIR}/
systemctl enable acpid.socket
install-apcupsd: create-dirs
install -m ${CONFMODE} clfs/tmpfiles/apcupsd.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/apcupsd.service ${UNITSDIR}/
systemctl enable apcupsd.service
install-dhcpd: create-dirs
install -m ${CONFMODE} clfs/default/dhcpd ${DEFAULTSDIR}/
install -m ${CONFMODE} clfs/units/dhcpd.service ${UNITSDIR}/
systemctl enable dhcpd.service
install-fcron: create-dirs
install -m ${CONFMODE} clfs/default/fcron ${DEFAULTSDIR}/
install -m ${CONFMODE} clfs/units/fcron.service ${UNITSDIR}/
systemctl enable fcron.service
install-gpm: create-dirs
install -m ${CONFMODE} clfs/default/gpm ${DEFAULTSDIR}/
install -m ${CONFMODE} clfs/units/gpm.service ${UNITSDIR}/
systemctl enable gpm.service
install-httpd: create-dirs
install -m ${CONFMODE} clfs/tmpfiles/httpd.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/httpd.service ${UNITSDIR}/
systemd-tmpfiles --create httpd.conf
systemctl enable httpd.service
install-kdm: create-dirs
install -m ${CONFMODE} clfs/units/kdm.service ${UNITSDIR}/
systemctl enable kdm.service
install-krb5: create-dirs
install -m ${CONFMODE} clfs/units/krb5-kdc.service ${UNITSDIR}/
install -m ${CONFMODE} clfs/units/krb5-kpropd.service ${UNITSDIR}/
install -m ${CONFMODE} clfs/units/krb5-kadmind.service ${UNITSDIR}/
systemctl enable krb5-kdc.service
systemctl enable krb5-kpropd.service
systemctl enable krb5-kadmind.service
install-mysqld: create-dirs
install -m ${CONFMODE} clfs/tmpfiles/mysqld.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/mysqld.service ${UNITSDIR}/
systemd-tmpfiles --create mysqld.conf
systemctl enable mysqld.service
install-named: create-dirs
install -m ${CONFMODE} clfs/tmpfiles/named.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/named.service ${UNITSDIR}/
systemd-tmpfiles --create named.conf
systemctl enable named.service
install-nscd: create-dirs
install -m ${CONFMODE} clfs/tmpfiles/nscd.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/nscd.service ${UNITSDIR}/
systemd-tmpfiles --create nscd.conf
systemctl enable nscd.service
install-ntpd: create-dirs
install -m ${CONFMODE} clfs/units/ntpd.service ${UNITSDIR}/
systemctl enable ntpd.service
install-postfix: create-dirs
install -m ${CONFMODE} clfs/units/postfix.service ${UNITSDIR}/
systemctl enable postfix.service
install-postgresql: create-dirs
install -m ${CONFMODE} clfs/tmpfiles/postgresql.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/postgresql.service ${UNITSDIR}/
systemd-tmpfiles --create postgresql.conf
systemctl enable postgresql.service
install-proftpd: create-dirs
install -m ${CONFMODE} clfs/units/proftpd.service ${UNITSDIR}/
systemctl enable proftpd.service
install-rsyncd: create-dirs
install -m ${CONFMODE} clfs/units/rsyncd.service ${UNITSDIR}/
install -m ${CONFMODE} clfs/units/rsyncdat.service ${UNITSDIR}/rsyncd@.service
install -m ${CONFMODE} clfs/units/rsyncd.socket ${UNITSDIR}/
systemctl enable rsyncd.service
install-samba: create-dirs
install -m ${CONFMODE} clfs/default/samba ${DEFAULTSDIR}/
install -m ${CONFMODE} clfs/tmpfiles/samba.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/nmbd.service ${UNITSDIR}/
install -m ${CONFMODE} clfs/units/smbd.service ${UNITSDIR}/
install -m ${CONFMODE} clfs/units/smbdat.service ${UNITSDIR}/smbd@.service
install -m ${CONFMODE} clfs/units/smbd.socket ${UNITSDIR}/
systemd-tmpfiles --create samba.conf
systemctl enable nmbd.service
systemctl enable smbd.service
install-saslauthd: create-dirs
install -m ${CONFMODE} clfs/default/saslauthd ${DEFAULTSDIR}/
install -m ${CONFMODE} clfs/tmpfiles/saslauthd.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/saslauthd.service ${UNITSDIR}/
systemd-tmpfiles --create saslauthd.conf
systemctl enable saslauthd.service
install-slapd: create-dirs
install -m ${CONFMODE} clfs/default/slapd ${DEFAULTSDIR}/
install -m ${CONFMODE} clfs/tmpfiles/slapd.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/slapd.service ${UNITSDIR}/
systemd-tmpfiles --create slapd.conf
systemctl enable slapd.service
install-sshd: create-dirs
install -m ${CONFMODE} clfs/tmpfiles/sshd.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/sshd.service ${UNITSDIR}/
install -m ${CONFMODE} clfs/units/sshdat.service ${UNITSDIR}/sshd@.service
install -m ${CONFMODE} clfs/units/sshd.socket ${UNITSDIR}/
systemd-tmpfiles --create sshd.conf
systemctl enable sshd.service
install-svnserve: create-dirs
install -m ${CONFMODE} clfs/default/svnserve ${DEFAULTSDIR}/
install -m ${CONFMODE} clfs/tmpfiles/svnserve.conf ${TMPFILESDIR}/
install -m ${CONFMODE} clfs/units/svnserve.service ${UNITSDIR}/
systemd-tmpfiles --create svnserve.conf
systemctl enable svnserve.service
install-swat: create-dirs
install -m ${CONFMODE} clfs/units/swatat.service ${UNITSDIR}/swat@.service
install -m ${CONFMODE} clfs/units/swat.socket ${UNITSDIR}/
systemctl enable swat.socket
install-winbindd: create-dirs
install -m ${CONFMODE} clfs/default/winbindd ${DEFAULTSDIR}/
install -m ${CONFMODE} clfs/units/winbindd.service ${UNITSDIR}/
systemctl enable winbindd.service
uninstall-acpid:
systemctl stop acpid.service
systemctl disable acpid.socket
rm -f ${UNITSDIR}/acpid.service ${UNITSDIR}/acpid.socket
uninstall-dhcpd:
systemctl stop dhcpd.service
systemctl disable dhcpd.service
rm -f ${DEFAULTSDIR}/dhcpd ${UNITSDIR}/dhcpd.service
uninstall-httpd:
systemctl stop httpd.service
systemctl disable httpd.service
rm -f ${TMPFILESDIR}/httpd.conf ${UNITSDIR}/httpd.service
uninstall-kdm:
systemctl stop kdm.service
systemctl disable kdm.service
rm -f ${UNITSDIR}/kdm.service
uninstall-krb5:
systemctl stop krb5-kadmind.service
systemctl stop krb5-kpropd.service
systemctl stop krb5-kdc.service
systemctl disable krb5-kadmind.service
systemctl disable krb5-kpropd.service
systemctl disable krb5-kdc.service
rm -f ${UNITSDIR}/krb5-kadmind.service ${UNITSDIR}/krb5-kpropd.service ${UNITSDIR}/krb5-kdc.service
uninstall-mysqld:
systemctl stop mysqld.service
systemctl disable mysqld.service
rm -f ${TMPFILESDIR}/mysqld.conf ${UNITSDIR}/mysqld.service
uninstall-named:
systemctl stop named.service
systemctl disable named.service
rm -f ${TMPFILESDIR}/named.conf ${UNITSDIR}/named.service
uninstall-nscd:
systemctl stop nscd.service
systemctl disable nscd.service
rm -f ${TMPFILESDIR}/nscd.conf ${UNITSDIR}/nscd.service
uninstall-ntpd:
systemctl stop ntpd.service
systemctl disable ntpd.service
rm -f ${UNITSDIR}/ntpd.service
uninstall-postfix:
systemctl stop postfix.service
systemctl disable postfix.service
rm -f ${UNITSDIR}/postfix.service
uninstall-postgresql:
systemctl stop postgresql.service
systemctl disable postgresql.service
rm -f ${TMPFILESDIR}/postgresql.conf ${UNITSDIR}/postgresql.service
uninstall-samba:
systemctl stop smbd.service
systemctl stop nmbd.service
systemctl disable smbd.service
systemctl disable nmbd.service
rm -f ${DEFAULTSDIR}/samba ${TMPFILESDIR}/samba.conf ${UNITSDIR}/nmbd.service
rm -f ${UNITSDIR}/smbd.service ${UNITSDIR}/smbd@.service t ${UNITSDIR}/smbd.socket
uninstall-saslauthd:
systemctl stop saslauthd.service
systemctl disable saslauthd.service
rm -f ${DEFAULTSDIR}/saslauthd ${TMPFILESDIR}/saslauthd.conf ${UNITSDIR}/saslauthd.service
uninstall-slapd:
systemctl stop slapd.service
systemctl disable slapd.service
rm -f ${DEFAULTSDIR}/slapd ${TMPFILESDIR}/slapd.conf ${UNITSDIR}/slapd.service
uninstall-sshd:
systemctl stop sshd.service
systemctl disable sshd.service
rm -f ${TMPFILESDIR}/sshd.conf ${UNITSDIR}/sshd.service
rm -f ${UNITSDIR}/sshd@.service ${UNITSDIR}/sshd.socket
uninstall-svnserve:
systemctl stop svnserve.service
systemctl disable svnserve.service
rm -f ${DEFAULTSDIR}/svnserve ${TMPFILESDIR}/svnserve.conf ${UNITSDIR}/svnserve.service
uninstall-swat:
systemctl stop swat.socket
systemctl disable swat.socket
rm -f ${UNITSDIR}/swat@.service ${UNITSDIR}/swat.socket
uninstall-winbindd:
systemctl stop winbindd.service
systemctl disable winbindd.service
rm -f ${DEFAULTSDIR}/winbindd ${UNITSDIR}/winbindd.service
.PHONY: all create-dirs create-service-dir \
install-service-dhclient \
install-service-dhcpcd \
install-service-bridge \
install-service-ipx \
install-service-pppoe \
install-service-wpa \
install-acpid \
install-dhcpd \
install-httpd \
install-kdm \
install-krb5 \
install-mysqld \
install-named \
install-nscd \
install-ntpd \
install-postfix \
install-postgresql \
install-samba \
install-saslauthd \
install-slapd \
install-sshd \
install-svnserve \
install-swat \
install-winbindd \
uninstall-acpid \
uninstall-dhcpd \
uninstall-httpd \
uninstall-kdm \
uninstall-krb5 \
uninstall-mysqld \
uninstall-named \
uninstall-nscd \
uninstall-ntpd \
uninstall-postfix \
uninstall-postgresql \
uninstall-samba \
uninstall-saslauthd \
uninstall-slapd \
uninstall-sshd \
uninstall-svnserve \
uninstall-swat
|