From b73bd04cf3f19b47480c85dd58e63eef5900fa3c Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 14 Dec 2007 12:23:13 +0000 Subject: If we need to regenrate the deptree in the boot runlevel, remove it afterwards as the dependencies may need programs brought up by localmount. The dependencies will be regenerated correctly in the next runlevel. --- src/runscript.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/runscript.c') diff --git a/src/runscript.c b/src/runscript.c index e4089c21..88ce71b8 100644 --- a/src/runscript.c +++ b/src/runscript.c @@ -684,7 +684,7 @@ static void svc_start (bool deps) depoptions |= RC_DEP_START; if (deps) { - if (! deptree && ((deptree = _rc_deptree_load ()) == NULL)) + if (! deptree && ((deptree = _rc_deptree_load (NULL)) == NULL)) eerrorx ("failed to load deptree"); rc_strlist_free (services); @@ -898,7 +898,7 @@ static void svc_stop (bool deps) if (rc_runlevel_stopping ()) depoptions |= RC_DEP_STOP; - if (! deptree && ((deptree = _rc_deptree_load ()) == NULL)) + if (! deptree && ((deptree = _rc_deptree_load (NULL)) == NULL)) eerrorx ("failed to load deptree"); rc_strlist_free (tmplist); @@ -1078,6 +1078,7 @@ int runscript (int argc, char **argv) /* Show help if insufficient args */ if (argc < 3) { + setenv ("SVCNAME", applet, 1); execl (RCSCRIPT_HELP, RCSCRIPT_HELP, service, (char *) NULL); eerrorx ("%s: failed to exec `" RCSCRIPT_HELP "': %s", applet, strerror (errno)); @@ -1259,7 +1260,7 @@ int runscript (int argc, char **argv) if (rc_conf_yesno ("rc_depend_strict")) depoptions |= RC_DEP_STRICT; - if (! deptree && ((deptree = _rc_deptree_load ()) == NULL)) + if (! deptree && ((deptree = _rc_deptree_load (NULL)) == NULL)) eerrorx ("failed to load deptree"); rc_strlist_free (services); -- cgit v1.2.3