aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-10-01 06:10:34 +0000
committerRoy Marples <roy@marples.name>2008-10-01 06:10:34 +0000
commitf53197818b663ae2178b1c31a4b1c6844a208617 (patch)
tree6bb509e37c931a41921d5fbf85c62af28bf34aef /src
parentbb41d2cc80927ba86fd49f98320bcce0d0d22edf (diff)
Correcly call the right runlevel for plugins when shutting down.
Diffstat (limited to 'src')
-rw-r--r--src/rc/rc.c7
1 files changed, 2 insertions, 5 deletions
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);