diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-14 03:16:28 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-14 03:16:28 +0100 |
commit | 1a8de6f8a2ae73568342a6f9768b937072ca4b3f (patch) | |
tree | 89700c4cf70efdd8a84ad5a5270bf506af0db29d | |
parent | 18f89128e58423f0335f5c9b32039e41651ac209 (diff) | |
download | busybox-w32-1a8de6f8a2ae73568342a6f9768b937072ca4b3f.tar.gz busybox-w32-1a8de6f8a2ae73568342a6f9768b937072ca4b3f.tar.bz2 busybox-w32-1a8de6f8a2ae73568342a6f9768b937072ca4b3f.zip |
init: use applet_name instead of "init" - we can be linuxrc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | init/init.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/init/init.c b/init/init.c index 669085eae..fb9c81ea4 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -119,7 +119,7 @@ static void message(int where, const char *fmt, ...) | |||
119 | msg[l] = '\0'; | 119 | msg[l] = '\0'; |
120 | if (where & L_LOG) { | 120 | if (where & L_LOG) { |
121 | /* Log the message to syslogd */ | 121 | /* Log the message to syslogd */ |
122 | openlog("init", 0, LOG_DAEMON); | 122 | openlog(applet_name, 0, LOG_DAEMON); |
123 | /* don't print "\r" */ | 123 | /* don't print "\r" */ |
124 | syslog(LOG_INFO, "%s", msg + 1); | 124 | syslog(LOG_INFO, "%s", msg + 1); |
125 | closelog(); | 125 | closelog(); |
@@ -482,8 +482,8 @@ static void new_init_action(uint8_t action_type, const char *command, const char | |||
482 | /* Don't enter action if it's already in the list, | 482 | /* Don't enter action if it's already in the list, |
483 | * This prevents losing running RESPAWNs. | 483 | * This prevents losing running RESPAWNs. |
484 | */ | 484 | */ |
485 | if ((strcmp(a->command, command) == 0) | 485 | if (strcmp(a->command, command) == 0 |
486 | && (strcmp(a->terminal, cons) == 0) | 486 | && strcmp(a->terminal, cons) == 0 |
487 | ) { | 487 | ) { |
488 | /* Remove from list */ | 488 | /* Remove from list */ |
489 | *nextp = a->next; | 489 | *nextp = a->next; |
@@ -842,7 +842,7 @@ int init_main(int argc UNUSED_PARAM, char **argv) | |||
842 | { | 842 | { |
843 | die_sleep = 30 * 24*60*60; /* if xmalloc would ever die... */ | 843 | die_sleep = 30 * 24*60*60; /* if xmalloc would ever die... */ |
844 | 844 | ||
845 | if (argv[1] && !strcmp(argv[1], "-q")) { | 845 | if (argv[1] && strcmp(argv[1], "-q") == 0) { |
846 | return kill(1, SIGHUP); | 846 | return kill(1, SIGHUP); |
847 | } | 847 | } |
848 | 848 | ||
@@ -896,7 +896,7 @@ int init_main(int argc UNUSED_PARAM, char **argv) | |||
896 | 896 | ||
897 | /* Check if we are supposed to be in single user mode */ | 897 | /* Check if we are supposed to be in single user mode */ |
898 | if (argv[1] | 898 | if (argv[1] |
899 | && (!strcmp(argv[1], "single") || !strcmp(argv[1], "-s") || LONE_CHAR(argv[1], '1')) | 899 | && (strcmp(argv[1], "single") == 0 || strcmp(argv[1], "-s") == 0 || LONE_CHAR(argv[1], '1')) |
900 | ) { | 900 | ) { |
901 | /* ??? shouldn't we set RUNLEVEL="b" here? */ | 901 | /* ??? shouldn't we set RUNLEVEL="b" here? */ |
902 | /* Start a shell on console */ | 902 | /* Start a shell on console */ |