blob: ea537a660be886be28ccd2c9893fa0b5542cd3af (
plain)
1 I created this modified rc package with the following in mind:
2
3 1) Replace bashisms with plain POSIX sh
4
5 Which means they work with whatever shell you have installed as
6 /bin/sh, also with bash, so no worries here, just as long as you
7 realize the rc.conf file should not contain arrays, but variables,
8 so your services line should look like:
9
10 SERVICES="net xfs xdm crond portmap nfsclient sshd"
11
12
13 2) Try to detect udev or devfs.
14
15 3) Avoid using tempfiles when not necessary.
16
17 4) Source rather than execute files if possible.
18
19 5) Avoid code duplication.
20
21 6) Avoid sending usefull errors to /dev/null
22
23 7) Added the script /sbin/service which saves code-duplication and
24 it is a simple frontend for /etc/rc.d/service
25
26
27 Why did I want to get rid of bash. Well:
28
29 ~% ls -l /bin/mksh
30 -rwxr-xr-x 1 root root 184K aug 21 15:38 /bin/mksh
31
32 Do you get it now? :-)
33
34
35 Stuff you may want to add to /etc/pkgadd.conf:
36
37 UPGRADE ^etc/rc$ YES
38 UPGRADE ^etc/rc.conf$ NO
39 UPGRADE ^etc/rc.dev$ YES
40 UPGRADE ^etc/rc.local$ NO
41 UPGRADE ^etc/rc.modules$ NO
42 UPGRADE ^etc/rc.multi$ YES
43 UPGRADE ^etc/rc.rescue$ YES
44 UPGRADE ^etc/rc.shutdown$ YES
45 UPGRADE ^etc/rc.single$ YES
|