diff options
Diffstat (limited to 'urunlevel/runlevel/boot_syslog.c')
-rw-r--r-- | urunlevel/runlevel/boot_syslog.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/urunlevel/runlevel/boot_syslog.c b/urunlevel/runlevel/boot_syslog.c new file mode 100644 index 0000000..dc7548a --- /dev/null +++ b/urunlevel/runlevel/boot_syslog.c | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * Mini syslog boot implementation for busybox. | ||
3 | * | ||
4 | * Copyright (C) 2004 by David Seikel won_fang@yahoo.com.au | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
19 | * 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include <unistd.h> | ||
24 | |||
25 | #include "busybox.h" | ||
26 | #include "lib_init_d.h" | ||
27 | |||
28 | |||
29 | static int start(struct init_d_handle_s *, int); | ||
30 | |||
31 | |||
32 | static init_d_handle_t my_commands = | ||
33 | { | ||
34 | &start, | ||
35 | NULL, | ||
36 | NULL, | ||
37 | NULL, | ||
38 | &no_reload, | ||
39 | NULL, | ||
40 | NULL, | ||
41 | NULL, | ||
42 | "boot_syslogd", | ||
43 | "/sbin/syslogd", | ||
44 | "-n", | ||
45 | NULL, | ||
46 | INIT_D_BEGIN \ | ||
47 | INIT_D_PROV "$syslog" \ | ||
48 | INIT_D_RSTART "$local_fs $time" \ | ||
49 | INIT_D_SSTART "$network" \ | ||
50 | INIT_D_DSTART "1 2 3 4 5" \ | ||
51 | INIT_D_DSTOP "0 6" \ | ||
52 | INIT_D_SDESC "System logger." \ | ||
53 | INIT_D_DESC "System logger." \ | ||
54 | INIT_D_END | ||
55 | }; | ||
56 | |||
57 | |||
58 | int boot_syslog_main(int argc, char **argv) | ||
59 | { | ||
60 | return do_init_from_main(argc, argv, &my_commands); | ||
61 | } | ||
62 | |||
63 | |||
64 | static int start(struct init_d_handle_s *init_d, int just_checking) | ||
65 | { | ||
66 | /* | ||
67 | #LOGHOST=`cat /var/lib/my_linux/config/loghost 2> /dev/null` | ||
68 | #if [ "$LOGHOST" ] | ||
69 | #then | ||
70 | # if [ "$LOGHOST" = "prompt" ] | ||
71 | # then | ||
72 | # echo -n "Enter syslog server: " | ||
73 | # read $LOGHOST | ||
74 | # fi | ||
75 | # $REMOTELOG = "-R $LOGHOST" | ||
76 | #fi | ||
77 | */ | ||
78 | return default_start(init_d, 0); | ||
79 | } | ||