summaryrefslogtreecommitdiffstats
path: root/urunlevel/runlevel/boot_syslog.c
diff options
context:
space:
mode:
Diffstat (limited to 'urunlevel/runlevel/boot_syslog.c')
-rw-r--r--urunlevel/runlevel/boot_syslog.c69
1 files changed, 33 insertions, 36 deletions
diff --git a/urunlevel/runlevel/boot_syslog.c b/urunlevel/runlevel/boot_syslog.c
index dc7548a..a3e7432 100644
--- a/urunlevel/runlevel/boot_syslog.c
+++ b/urunlevel/runlevel/boot_syslog.c
@@ -3,6 +3,8 @@
3 * 3 *
4 * Copyright (C) 2004 by David Seikel won_fang@yahoo.com.au 4 * Copyright (C) 2004 by David Seikel won_fang@yahoo.com.au
5 * 5 *
6 * Originally based on code from Trinux.
7 *
6 * This program is free software; you can redistribute it and/or modify 8 * 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 9 * 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 10 * the Free Software Foundation; either version 2 of the License, or
@@ -29,51 +31,46 @@
29static int start(struct init_d_handle_s *, int); 31static int start(struct init_d_handle_s *, int);
30 32
31 33
32static init_d_handle_t my_commands = 34static init_d_handle_t my_commands = {
33{ 35 &start,
34 &start, 36 NULL,
35 NULL, 37 NULL,
36 NULL, 38 NULL,
37 NULL, 39 &no_reload,
38 &no_reload, 40 NULL,
39 NULL, 41 NULL,
40 NULL, 42 NULL,
41 NULL, 43 "syslog",
42 "boot_syslogd", 44 "/sbin/syslogd",
43 "/sbin/syslogd", 45 "-n",
44 "-n", 46 NULL,
45 NULL, 47 INIT_D_BEGIN
46 INIT_D_BEGIN \ 48 INIT_D_PROV "$syslog"
47 INIT_D_PROV "$syslog" \ 49 INIT_D_RSTART "$local_fs $time"
48 INIT_D_RSTART "$local_fs $time" \ 50 INIT_D_SSTART "$network"
49 INIT_D_SSTART "$network" \ 51 INIT_D_DSTART "1 2 3 4 5"
50 INIT_D_DSTART "1 2 3 4 5" \ 52 INIT_D_DSTOP "0 6"
51 INIT_D_DSTOP "0 6" \ 53 INIT_D_SDESC "System logger." INIT_D_DESC "System logger." INIT_D_END
52 INIT_D_SDESC "System logger." \
53 INIT_D_DESC "System logger." \
54 INIT_D_END
55}; 54};
56 55
57 56
58int boot_syslog_main(int argc, char **argv) 57int boot_syslog_main(int argc, char **argv)
59{ 58{
60 return do_init_from_main(argc, argv, &my_commands); 59 return do_init_from_main(argc, argv, &my_commands);
61} 60}
62 61
63 62
64static int start(struct init_d_handle_s *init_d, int just_checking) 63static int start(struct init_d_handle_s *init_d, int just_checking)
65{ 64{
66/* 65 char *LOGHOST = getenv("SYSLOGD_LOGHOST");
67#LOGHOST=`cat /var/lib/my_linux/config/loghost 2> /dev/null` 66
68#if [ "$LOGHOST" ] 67 if (LOGHOST && (LOGHOST[0] != '\0')) {
69#then 68 char *temp; /* Being paranoid here, probably. */
70# if [ "$LOGHOST" = "prompt" ] 69
71# then 70 bb_xasprintf(&temp, "%s", init_d->args);
72# echo -n "Enter syslog server: " 71 bb_xasprintf(&(init_d->args), "%s -R %s", temp, LOGHOST);
73# read $LOGHOST 72 free(temp);
74# fi 73 }
75# $REMOTELOG = "-R $LOGHOST" 74
76#fi
77*/
78 return default_start(init_d, 0); 75 return default_start(init_d, 0);
79} 76}