From: John Crispin Date: Thu, 30 Oct 2014 10:07:26 +0000 (+0100) Subject: Log startup/shutdown to console X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=07c7864d49723b1264ee8bcd6861ea92f679ee98;p=project%2Fprocd.git Log startup/shutdown to console procd has the habit of logging startup/shutdown via rcS to syslog, which is pointless in case of a shutdown, and unlikely to be complete on a startup (as syslog is not running). Write to the console instead. Signed-off-by: Michel Stam Signed-off-by: John Crispin --- diff --git a/rcS.c b/rcS.c index 4545621..8c72c19 100644 --- a/rcS.c +++ b/rcS.c @@ -55,6 +55,9 @@ static void pipe_cb(struct ustream *s, int bytes) *newline = 0; len = newline + 1 - str; syslog(0, "%s", str); +#ifdef SHOW_BOOT_ON_CONSOLE + fprintf(stderr, "%s\n", str); +#endif ustream_consume(s, len); } while (1); }