From f53197818b663ae2178b1c31a4b1c6844a208617 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 1 Oct 2008 06:10:34 +0000 Subject: Correcly call the right runlevel for plugins when shutting down. --- src/rc/rc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/rc') diff --git a/src/rc/rc.c b/src/rc/rc.c index 35dc53f2..75453838 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -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); -- cgit v1.2.3