blob: a2bf6281c61a2877272c94440ea5205347567fa7 (
about) (
plain) (
blame)
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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
|
#!/bin/sh
#BLURB="Select/deselect system daemons (services)"
TMP=/var/lib/pkgtools/setup/tmp
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
T_PX="$1"
cd $T_PX
rm -f $TMP/tmpscript
cat << EOF > $TMP/tmpscript
dialog --title "CONFIRM STARTUP SERVICES TO RUN" --item-help --checklist \\
"The selected services will be started at boot time. If you \\
don't need them, you may unselect them to turn them off (which may improve \\
overall system security). You may also choose to start services that are \\
not run by default, but be aware that more services means less security. \\
Use the spacebar to select or unselect the services you wish to run. \\
Recommended choices have been preselected. \\
Press the ENTER key when you are finished." \\
20 75 7 \\
EOF
if [ -r etc/rc.d/rc.atalk ]; then
if [ -x etc/rc.d/rc.atalk ]; then
RC_ATALK=on
else
RC_ATALK=off
fi
cat << EOF >> $TMP/tmpscript
"rc.atalk" "Netatalk Appletalk file/print server" $RC_ATALK "The Netatalk server is a file and print server for Macintosh networks." \\
EOF
fi
if [ -r etc/rc.d/rc.atd ]; then
if [ -x etc/rc.d/rc.atd ]; then
RC_ATD=on
else
RC_ATD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.atd" "Schedules jobs for later" $RC_ATD "The at daemon schedules jobs to be run at a specified time." \\
EOF
fi
if [ -r etc/rc.d/rc.avahidaemon ]; then
if [ -x etc/rc.d/rc.avahidaemon ]; then
RC_AVAHIDAEMON=on
else
RC_AVAHIDAEMON=off
fi
cat << EOF >> $TMP/tmpscript
"rc.avahidaemon" "Zeroconf implementation" $AVAHIDAEMON "Avahi is a system which facilitates service discovery on a local network." \\
EOF
fi
if [ -r etc/rc.d/rc.avahidnsconfd ]; then
if [ -x etc/rc.d/rc.avahidnsconfd ]; then
RC_AVAHIDNDCONFD=on
else
RC_AVAHIDNDCONFD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.avahidnsconfd" "Unicast DNS server for Avahi" $RC_AVAHIDNDCONFD "Queries the LAN for DNS servers that can be listed in /etc/resolv.conf." \\
EOF
fi
if [ -r etc/rc.d/rc.bind ]; then
if [ -x etc/rc.d/rc.bind ]; then
RC_BIND=on
else
RC_BIND=off
fi
cat << EOF >> $TMP/tmpscript
"rc.bind" "BIND (Domain Name System) server" $RC_BIND "BIND (Berkeley Internet Name Domain) is a Domain Name System (DNS) server." \\
EOF
fi
if [ -r etc/rc.d/rc.crond ]; then
if [ -x etc/rc.d/rc.crond ]; then
RC_CROND=on
else
RC_CROND=off
fi
cat << EOF >> $TMP/tmpscript
"rc.crond" "Time based job scheduler" $RC_CROND "The cron daemon schedules jobs to run at fixed times, dates, or intervals." \\
EOF
fi
if [ -r etc/rc.d/rc.cups ]; then
if [ -x etc/rc.d/rc.cups ]; then
RC_CUPS=on
else
RC_CUPS=off
fi
cat << EOF >> $TMP/tmpscript
"rc.cups" "CUPS print server" $RC_CUPS "The Common UNIX Printing system (print spooler choice #1)." \\
EOF
fi
if [ -r etc/rc.d/rc.dnsmasq ]; then
if [ -x etc/rc.d/rc.dnsmasq ]; then
RC_DNSMASQ=on
else
RC_DNSMASQ=off
fi
cat << EOF >> $TMP/tmpscript
"rc.dnsmasq" "dnsmasq DHCP/DNS server" $RC_DNSMASQ "dnsmasq provides DNS and DHCP service to a LAN." \\
EOF
fi
if [ -r etc/rc.d/rc.dovecot ]; then
if [ -x etc/rc.d/rc.dovecot ]; then
RC_DOVECOT=on
else
RC_DOVECOT=off
fi
cat << EOF >> $TMP/tmpscript
"rc.dovecot" "Dovecot IMAP/POP3 server" $RC_DOVECOT "Dovecot provides remote mailbox access for email clients." \\
EOF
fi
if [ -r etc/rc.d/rc.fuse ]; then
if [ -x etc/rc.d/rc.fuse ]; then
RC_FUSE=on
else
RC_FUSE=off
fi
cat << EOF >> $TMP/tmpscript
"rc.fuse" "Filesystem in Userspace library" $RC_FUSE "FUSE is an interface to allow userspace programs to use filesystems." \\
EOF
fi
if [ -r etc/rc.d/rc.hald ]; then
if [ -x etc/rc.d/rc.hald ]; then
RC_HALD=on
else
RC_HALD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.hald" "Hardware Abstraction Layer" $RC_HALD "HAL makes access to CD/DVD drives and USB devices easier." \\
EOF
fi
if [ -r etc/rc.d/rc.hplip ]; then
if [ -x etc/rc.d/rc.hplip ]; then
RC_HPLIP=on
else
RC_HPLIP=off
fi
cat << EOF >> $TMP/tmpscript
"rc.hplip" "HP printer/scanner daemons" $RC_HPLIP "Programs used to run printers and scanners from Hewlett Packard." \\
EOF
fi
if [ -r etc/rc.d/rc.httpd ]; then
if [ -x etc/rc.d/rc.httpd ]; then
RC_HTTPD=on
else
RC_HTTPD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.httpd" "The Apache web server" $RC_HTTPD "Apache, the most widely used web server on the net." \\
EOF
fi
if [ -r etc/rc.d/rc.inetd ]; then
if [ -x etc/rc.d/rc.inetd ]; then
RC_INETD=on
else
RC_INETD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.inetd" "The BSD Inetd daemon" $RC_INETD "Inetd daemon (this allows: time, ftp, comsat, talk, finger, and auth)." \\
EOF
fi
if [ -r etc/rc.d/rc.ip_forward ]; then
if [ -x etc/rc.d/rc.ip_forward ]; then
RC_IP_FORWARD=on
else
RC_IP_FORWARD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.ip_forward" "Activate IP packet forwarding" $RC_IP_FORWARD "Packet forwarding allows your Linux machine to act as a router." \\
EOF
fi
if [ -r etc/rc.d/rc.lprng ]; then
if [ -x etc/rc.d/rc.lprng ]; then
RC_LPRNG=on
else
RC_LPRNG=off
fi
cat << EOF >> $TMP/tmpscript
"rc.lprng" "LPRng print server" $RC_LPRNG "The LPRng printing system (print spooler choice #2)." \\
EOF
fi
if [ -r etc/rc.d/rc.messagebus ]; then
if [ -x etc/rc.d/rc.messagebus ]; then
RC_MESSAGEBUS=on
else
RC_MESSAGEBUS=off
fi
cat << EOF >> $TMP/tmpscript
"rc.messagebus" "D-Bus system message bus" $RC_MESSAGEBUS "Used for interprocess communication and coordination." \\
EOF
fi
if [ -r etc/rc.d/rc.mysqld ]; then
if [ -x etc/rc.d/rc.mysqld ]; then
RC_MYSQLD=on
else
RC_MYSQLD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.mysqld" "The MySQL database server" $RC_MYSQLD "MySQL, an SQL-based relational database daemon." \\
EOF
fi
if [ -r etc/rc.d/rc.nfsd ]; then
if [ -x etc/rc.d/rc.nfsd ]; then
RC_NFSD=on
else
RC_NFSD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.nfsd" "The Network File System Daemons" $RC_NFSD "Daemons needed to share files to other machines using NFS." \\
EOF
fi
if [ -r etc/rc.d/rc.ntpd ]; then
if [ -x etc/rc.d/rc.ntpd ]; then
RC_NTPD=on
else
RC_NTPD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.ntpd" "The network time server" $RC_NTPD "NTP synchronizes your time to/from other NTP servers." \\
EOF
fi
if [ -r etc/rc.d/rc.openldap ]; then
if [ -x etc/rc.d/rc.openldap ]; then
RC_OPENLDAP=on
else
RC_OPENLDAP=off
fi
cat << EOF >> $TMP/tmpscript
"rc.openldap" "OpenLDAP server" $RC_OPENLDAP "The stand-alone LDAP daemon (slapd)." \\
EOF
fi
if [ -r etc/rc.d/rc.openvpn ]; then
if [ -x etc/rc.d/rc.openvpn ]; then
RC_OPENVPN=on
else
RC_OPENVPN=off
fi
cat << EOF >> $TMP/tmpscript
"rc.openvpn" "OpenVPN daemon" $RC_OPENVPN "A secure IP tunnel daemon." \\
EOF
fi
if [ -r etc/rc.d/rc.pcmcia ]; then
if [ -x etc/rc.d/rc.pcmcia ]; then
RC_PCMCIA=on
else
RC_PCMCIA=off
fi
cat << EOF >> $TMP/tmpscript
"rc.pcmcia" "PCMCIA/Cardbus card services" $RC_PCMCIA "This supports PCMCIA or Cardbus cards used with laptops." \\
EOF
fi
if [ -r etc/rc.d/rc.postfix ]; then
if [ -x etc/rc.d/rc.postfix ]; then
RC_POSTFIX=on
else
RC_POSTFIX=off
fi
cat << EOF >> $TMP/tmpscript
"rc.postfix" "The Postfix mail server" $RC_POSTFIX "The Postfix server allows your machine to send and receive mail." \\
EOF
fi
if [ -r etc/rc.d/rc.rpc ]; then
if [ -x etc/rc.d/rc.rpc ]; then
RC_RPC=on
else
RC_RPC=off
fi
cat << EOF >> $TMP/tmpscript
"rc.rpc" "RPC (NFS) daemons" $RC_RPC "Needed to serve or mount NFS (Network File System) partitions." \\
EOF
fi
if [ -r etc/rc.d/rc.samba ]; then
if [ -x etc/rc.d/rc.samba ]; then
RC_SAMBA=on
else
RC_SAMBA=off
fi
cat << EOF >> $TMP/tmpscript
"rc.samba" "The Samba file/print server" $RC_SAMBA "Samba is a file and print server for Windows networks." \\
EOF
fi
if [ -r etc/rc.d/rc.saslauthd ]; then
if [ -x etc/rc.d/rc.saslauthd ]; then
RC_SASLAUTHD=on
else
RC_SASLAUTHD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.saslauthd" "The SASL authentication server" $RC_SASLAUTHD "SASL is an authentication method often used by mail servers." \\
EOF
fi
if [ -r etc/rc.d/rc.sendmail ]; then
if [ -x etc/rc.d/rc.sendmail ]; then
RC_SENDMAIL=on
else
RC_SENDMAIL=off
fi
cat << EOF >> $TMP/tmpscript
"rc.sendmail" "The Sendmail mail server" $RC_SENDMAIL "The Sendmail server allows your machine to send and receive mail." \\
EOF
fi
if [ -r etc/rc.d/rc.smartd ]; then
if [ -x etc/rc.d/rc.smartd ]; then
RC_SMARTD=on
else
RC_SMARTD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.smartd" "SMART monitoring daemon" $RC_SMARTD "The SMART daemon monitors your hard drives to help predict failures." \\
EOF
fi
if [ -r etc/rc.d/rc.snmpd ]; then
if [ -x etc/rc.d/rc.snmpd ]; then
RC_SNMPD=on
else
RC_SNMPD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.snmpd" "Net-SNMP daemon" $RC_SNMPD "SNMP daemon that receives and logs SNMP TRAP and INFORM messages." \\
EOF
fi
if [ -r etc/rc.d/rc.syslog ]; then
if [ -x etc/rc.d/rc.syslog ]; then
RC_SYSLOGD=on
else
RC_SYSLOGD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.syslog" "The Linux system logging utilities" $RC_SYSLOGD "The syslogd and klogd daemons log important messages under /var/log." \\
EOF
fi
if [ -r etc/rc.d/rc.sshd ]; then
if [ -x etc/rc.d/rc.sshd ]; then
RC_SSHD=on
else
RC_SSHD=off
fi
cat << EOF >> $TMP/tmpscript
"rc.sshd" "The SSHD (secure shell) daemon" $RC_SSHD "SSHD allows secure encrypted logins to your machine." \\
EOF
fi
cat << EOF >> $TMP/tmpscript
2> $TMP/reply
EOF
. $TMP/tmpscript
if [ ! $? = 0 ]; then
rm -f $TMP/reply $TMP/tmpscript
exit
fi
for service in rc.atalk rc.atd rc.avahidaemon rc.avahidnsconfd rc.bind rc.crond rc.cups rc.dovecot rc.dnsmasq rc.fuse rc.hald rc.hplip rc.httpd rc.inetd rc.ip_forward rc.lprng rc.messagebus rc.mysqld rc.nfsd rc.ntpd rc.openldap rc.openvpn rc.pcmcia rc.postfix rc.rpc rc.samba rc.saslauthd rc.smartd rc.snmpd rc.sendmail rc.syslog rc.sshd ; do
if [ -f etc/rc.d/$service ]; then
if grep -w $service $TMP/reply 1> /dev/null ; then
chmod 755 etc/rc.d/$service
else
chmod 644 etc/rc.d/$service
fi
fi
done
rm -f $TMP/reply $TMP/tmpscript
|