Disallow hotplug to run during sysinit, but allow elsewhere. Fixes #131.
This commit is contained in:
parent
1ff289e305
commit
4dba5b1ff1
@ -717,9 +717,9 @@ svc_start(bool deps)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
background = true;
|
background = true;
|
||||||
rc_service_mark(service, RC_SERVICE_HOTPLUGGED);
|
rc_service_mark(service, RC_SERVICE_HOTPLUGGED);
|
||||||
if (rc_runlevel_starting())
|
if (strcmp(runlevel, RC_LEVEL_SYSINIT) == 0)
|
||||||
ewarnx("WARNING: %s will be started when the runlevel"
|
ewarnx("WARNING: %s will be started in the"
|
||||||
" has finished.", applet);
|
" net runlevel.", applet);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state & RC_SERVICE_STARTED) {
|
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 */
|
/* Change dir to / to ensure all init scripts don't use stuff in pwd */
|
||||||
chdir("/");
|
chdir("/");
|
||||||
|
|
||||||
if ((runlevel = xstrdup (getenv ("RC_RUNLEVEL"))) == NULL) {
|
if ((runlevel = xstrdup(getenv("RC_RUNLEVEL"))) == NULL) {
|
||||||
env_filter();
|
env_filter();
|
||||||
env_config();
|
env_config();
|
||||||
runlevel = rc_runlevel_get();
|
runlevel = rc_runlevel_get();
|
||||||
|
Loading…
Reference in New Issue
Block a user