aboutsummaryrefslogtreecommitdiff
path: root/src/sysvinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysvinit.c')
-rw-r--r--src/sysvinit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sysvinit.c b/src/sysvinit.c
index 7fad00b..87a52d6 100644
--- a/src/sysvinit.c
+++ b/src/sysvinit.c
@@ -61,6 +61,8 @@ int prevlevel = 'N';
int initdefault; /* Default runlevel */
int dfl_level;
int emergency_shell;
+
+#define DIAG_CON (DIAG_TO_STDERR|DIAG_REOPEN_LOG)
int
console_open (int mode)
@@ -430,6 +432,8 @@ sysvinit_set_runlevel (int newlevel)
case 'A':
case 'B':
case 'C':
+ diagmsg (DIAG_ALL, LOG_INFO,
+ "Activating on-demand level '%c'", newlevel);
sysvinit_demand (newlevel);
break;
@@ -437,10 +441,11 @@ sysvinit_set_runlevel (int newlevel)
if (newlevel == runlevel)
{
}
- if (runlevel_index (newlevel) == -1)
+ else if (runlevel_index (newlevel) == -1)
return -1;
else
{
+ diagmsg (DIAG_ALL, LOG_INFO, "Switching to runlevel: %c", newlevel);
dfl_level = newlevel;
raise (SIGALRM);
}
@@ -827,6 +832,7 @@ inittrans ()
/* boot -> normal */
create_fifo ();
ctl_open ();
+ diag_setup (DIAG_TO_SYSLOG | DIAG_REOPEN_LOG);
}
}
if (newlevel && newlevel != runlevel)
@@ -849,10 +855,12 @@ inittrans ()
/* Stop disabled programs */
sig = SIGTERM;
+ diagmsg (DIAG_CON, LOG_INFO, "Sending processes the TERM signal");
progman_foreach (terminate_disabled, &sig);
if (progman_wait_until (no_disabled_running, NULL))
{
sig = SIGKILL;
+ diagmsg (DIAG_CON, LOG_INFO, "Sending processes the KILL signal");
progman_foreach (terminate_disabled, &sig);
progman_wait_until (no_disabled_running, NULL);
}

Return to:

Send suggestions and report system problems to the System administrator.