When stopping services, check the newlevel if given otherwise the current runlevel. Fixes #100.

This commit is contained in:
Roy Marples 2008-09-27 16:56:03 +00:00
parent abe94bec6f
commit 28d7fb9430

View File

@ -805,7 +805,7 @@ static void do_stop_services(const char *newlevel, bool going_down, bool paralle
tmplist = rc_stringlist_new(); tmplist = rc_stringlist_new();
rc_stringlist_add(tmplist, service->value); rc_stringlist_add(tmplist, service->value);
deporder = rc_deptree_depends(deptree, types_n, tmplist, deporder = rc_deptree_depends(deptree, types_n, tmplist,
runlevel, newlevel ? newlevel : runlevel,
RC_DEP_STRICT | RC_DEP_TRACE); RC_DEP_STRICT | RC_DEP_TRACE);
rc_stringlist_free(tmplist); rc_stringlist_free(tmplist);
svc2 = NULL; svc2 = NULL;