1 |
hi |
2 |
|
3 |
is there a dependancy named SYSLOG for the new initscripts ? |
4 |
|
5 |
like: |
6 |
|
7 |
depend() { |
8 |
need syslog |
9 |
} |
10 |
|
11 |
it could be useful for starting klogd before /etc/init.d/modules so that |
12 |
our bootup will be a bit cleaner. |
13 |
|
14 |
here is a example of what i mean (i added sysklogd to the boot |
15 |
runlevel): |
16 |
|
17 |
/etc/init.d/modules.diff: |
18 |
-------------------cut here------------------------ |
19 |
*** modules.orig Mon Sep 17 02:21:25 2001 |
20 |
--- modules Sun Sep 16 18:20:46 2001 |
21 |
*************** |
22 |
*** 1,7 **** |
23 |
#!/sbin/runscript |
24 |
|
25 |
depend() { |
26 |
! need bootmisc localmount |
27 |
} |
28 |
|
29 |
start() { |
30 |
--- 1,7 ---- |
31 |
#!/sbin/runscript |
32 |
|
33 |
depend() { |
34 |
! need bootmisc localmount sysklogd |
35 |
} |
36 |
|
37 |
start() { |
38 |
---------------------cut here------------------------ |
39 |
|
40 |
and /etc/init.d/sysklogd: |
41 |
---------------------cut here------------------------ |
42 |
#!/sbin/runscript |
43 |
|
44 |
klog="/usr/sbin/klogd" |
45 |
slog="/usr/sbin/syslogd" |
46 |
|
47 |
#only warnings and up gets logged to console |
48 |
#so our bootup is much cleaner |
49 |
KLOGD="$KLOGD -c 3 -2" |
50 |
#SYSLOGD="$SYSLOGD -m 0" |
51 |
|
52 |
depend() { |
53 |
need hostname |
54 |
} |
55 |
|
56 |
start() { |
57 |
ebegin "Starting syslogd, klogd" |
58 |
start-stop-daemon --start --exec $slog -- $SYSLOGD 1>&2 |
59 |
retval=$? |
60 |
start-stop-daemon --start --exec $klog -- $KLOGD 1>&2 |
61 |
retval=$(( $retval + $? )) |
62 |
eend $retval |
63 |
} |
64 |
|
65 |
stop() { |
66 |
ebegin "Stopping klogd, syslogd" |
67 |
start-stop-daemon --stop --pidfile /var/run/klogd.pid 1>&2 |
68 |
retval=$? |
69 |
start-stop-daemon --stop --pidfile /var/run/syslogd.pid 1>&2 |
70 |
retval=$(( $retval + $? )) |
71 |
eend $retval |
72 |
} |
73 |
--------------------cut here-------------------------- |
74 |
|
75 |
greetings |
76 |
MS |