1 |
root |
1.1 |
#!/ vim, this is /bash syntax !/ |
2 |
|
|
|
3 |
|
|
PENGUIN=1 # display pengo (requires a lot of space!) |
4 |
|
|
TERMBLANK=60 # screen blanking timeout |
5 |
|
|
SYSV_EXEC=0 # execute sysv-scripts in $RCDIR/rc?.d/[SK][0-9][0-9]* |
6 |
root |
1.2 |
SYSV_FAC=1 # scripts in $RCDIR/init.d/* are used to supplement builtins |
7 |
|
|
SYSV_PRI=1 # give sysv scripts priority? else builtins overwrite |
8 |
root |
1.1 |
SLOW_TERMINAL=0 # set if terminal is slow (serial console, slow machine) |
9 |
|
|
#CONSOLE=/dev/console # use console other than default /dev/tty1? |
10 |
|
|
VENDOR_STRING="DIY 0.2 / Ticklish Uvula" |
11 |
|
|
#RESET=1 # clear the sceren after changing runlevels |
12 |
|
|
|
13 |
|
|
HOSTNAME="cerebro" |
14 |
|
|
|
15 |
|
|
# since most programs are now searched via the PATH, better set it |
16 |
|
|
PATH=$PATH:/usr/app/bin:/usr/app/sbin:/opt/bin:/opt/sbin |
17 |
|
|
|
18 |
root |
1.3 |
test -f /proc/$$/lock && echo 1 >/proc/$$/lock |
19 |
root |
1.1 |
|
20 |
|
|
defalias eth0 "ethernet" 'netdev::eth0:10.0.0.1:10.0.0.0:255.255.255.0' |
21 |
|
|
#defalias eth0 "ethernet" 'netdev::eth0:172.20.10.44:172.20.0.0:255.255.0.0' |
22 |
|
|
defalias squid "squid" "simpledaemon::squid" |
23 |
|
|
|
24 |
|
|
def smartenable "Enable smart automatic offline test" |
25 |
|
|
start() { |
26 |
|
|
( |
27 |
|
|
for dev in "$@"; do |
28 |
|
|
smartctl -et $dev & |
29 |
|
|
done |
30 |
|
|
wait |
31 |
|
|
) |
32 |
|
|
} |
33 |
|
|
end |
34 |
|
|
|
35 |
|
|
defseq lm_sensors "LM Sensor" |
36 |
|
|
add module::i2c-viapro |
37 |
|
|
add module::w83781d |
38 |
|
|
end |
39 |
|
|
|
40 |
|
|
# facilities to be run on bootup-check (sysinit) |
41 |
|
|
defrl BCHK |
42 |
|
|
add sysinfo |
43 |
|
|
add autoboot_check |
44 |
|
|
add cmos_clock |
45 |
|
|
add init_swap |
46 |
|
|
#add checkfs_root |
47 |
|
|
add mount_proc |
48 |
|
|
add mount_devpts |
49 |
|
|
add sysctl |
50 |
|
|
add mount_root |
51 |
|
|
add check_modules |
52 |
|
|
add init_mtab |
53 |
|
|
add serial_ports |
54 |
|
|
end |
55 |
|
|
|
56 |
|
|
# facilities to be run on system-boot (boot) |
57 |
|
|
defrl BOOT |
58 |
|
|
add update |
59 |
|
|
add mount_ext2 |
60 |
|
|
add kmesg |
61 |
|
|
add clear_misc |
62 |
|
|
#add check_logs |
63 |
|
|
add init_utmp |
64 |
|
|
add mount_noext2 |
65 |
|
|
add clean_temp |
66 |
|
|
add "sh::hdparm -qM254 /dev/hd[acdefgik]" |
67 |
|
|
add "sh::hdparm -qd1 -qu1 -qc1 /dev/hd[abcdefgik]" |
68 |
|
|
add smartenable::/dev/hd[aceghik] |
69 |
|
|
#add lm_sensors |
70 |
|
|
end |
71 |
|
|
|
72 |
|
|
# standard multiuser services... |
73 |
|
|
defrl MULTISERV |
74 |
|
|
add randomdevice |
75 |
|
|
add hostname |
76 |
|
|
add automount |
77 |
|
|
add rpc_portmap |
78 |
|
|
add netdev_lo |
79 |
|
|
add syslogd |
80 |
|
|
add klogd |
81 |
|
|
add mysqld |
82 |
|
|
add inetd |
83 |
|
|
add fw |
84 |
|
|
add cannaserver |
85 |
|
|
add +sshd |
86 |
|
|
add httpd |
87 |
|
|
add crond |
88 |
|
|
add rpc_mountd |
89 |
|
|
add rpc_nfsd |
90 |
|
|
add eth0 |
91 |
|
|
add default_gateway::10.0.0.5 |
92 |
|
|
#add default_gateway::172.20.254.254 |
93 |
|
|
add ntpd |
94 |
|
|
add squid |
95 |
|
|
#add exportfs |
96 |
|
|
add +'sh::/root/s/apc 1 2 3 4' |
97 |
|
|
add -'sh::/root/s/apc 2 2 3 4' |
98 |
|
|
add -sshd |
99 |
|
|
end |
100 |
|
|
|
101 |
|
|
# standard system-stop sequence |
102 |
|
|
defrl SYSTEMSTOP |
103 |
|
|
add killprocs |
104 |
|
|
add write_utmp |
105 |
|
|
add safe_remount::umount |
106 |
|
|
#add 'sh::hdparm -qW0 /dev/hd[aceghik]' |
107 |
|
|
end |
108 |
|
|
|
109 |
|
|
# standard runlevels (N means after boot) |
110 |
|
|
|
111 |
|
|
defrl S # singleuser |
112 |
|
|
add killprocs |
113 |
|
|
add safe_remount |
114 |
|
|
end |
115 |
|
|
|
116 |
|
|
defrl 0 # halt |
117 |
|
|
add @SYSTEMSTOP |
118 |
|
|
add syncalot::3 |
119 |
|
|
add system_stop::halt |
120 |
|
|
end |
121 |
|
|
|
122 |
|
|
defrl 1 # unused |
123 |
|
|
add @2 |
124 |
|
|
end |
125 |
|
|
|
126 |
|
|
defrl 2 # multiuser + X |
127 |
|
|
add @MULTISERV |
128 |
|
|
end |
129 |
|
|
|
130 |
|
|
defrl 3 # multiuser - X |
131 |
|
|
add @2 |
132 |
|
|
end |
133 |
|
|
|
134 |
|
|
defrl 4 # unused |
135 |
|
|
add @2 |
136 |
|
|
end |
137 |
|
|
|
138 |
|
|
defrl 5 # unused |
139 |
|
|
add @2 |
140 |
|
|
end |
141 |
|
|
|
142 |
|
|
defrl 6 # reboot |
143 |
|
|
add @SYSTEMSTOP |
144 |
|
|
add system_stop::reboot |
145 |
|
|
end |
146 |
|
|
|