aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-12-23 10:40:27 +0000
committerRoy Marples <roy@marples.name>2008-12-23 10:40:27 +0000
commit4dba5b1ff1c50ab7b40111f529ee8a5179ffb9ee (patch)
treef487d97debc5f15c4e2b49a981ac8f830b88c73a /src
parent1ff289e3055206fd0d93e2a697a93f701e367f5d (diff)
Disallow hotplug to run during sysinit, but allow elsewhere. Fixes #131.
Diffstat (limited to 'src')
-rw-r--r--src/rc/runscript.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 9178cdcd..2a1b574f 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -717,9 +717,9 @@ svc_start(bool deps)
exit(EXIT_FAILURE);
background = true;
rc_service_mark(service, RC_SERVICE_HOTPLUGGED);
- if (rc_runlevel_starting())
- ewarnx("WARNING: %s will be started when the runlevel"
- " has finished.", applet);
+ if (strcmp(runlevel, RC_LEVEL_SYSINIT) == 0)
+ ewarnx("WARNING: %s will be started in the"
+ " net runlevel.", applet);
}
if (state & RC_SERVICE_STARTED) {
@@ -1236,7 +1236,7 @@ runscript(int argc, char **argv)
/* Change dir to / to ensure all init scripts don't use stuff in pwd */
chdir("/");
- if ((runlevel = xstrdup (getenv ("RC_RUNLEVEL"))) == NULL) {
+ if ((runlevel = xstrdup(getenv("RC_RUNLEVEL"))) == NULL) {
env_filter();
env_config();
runlevel = rc_runlevel_get();