Correcly call the right runlevel for plugins when shutting down.

This commit is contained in:
Roy Marples 2008-10-01 06:10:34 +00:00
parent bb41d2cc80
commit f53197818b

View File

@ -1188,10 +1188,6 @@ int main(int argc, char **argv)
}
}
/* Save our runlevel now */
if (going_down)
rc_runlevel_set(newlevel);
parallel = rc_conf_yesno("rc_parallel");
/* Now stop the services that shouldn't be running */
@ -1202,7 +1198,8 @@ int main(int argc, char **argv)
wait_for_services();
/* Notify the plugins we have finished */
rc_plugin_run(RC_HOOK_RUNLEVEL_STOP_OUT, runlevel);
rc_plugin_run(RC_HOOK_RUNLEVEL_STOP_OUT,
going_down ? newlevel : runlevel);
hook_out = 0;
rmdir(RC_STOPPING);