aboutsummaryrefslogtreecommitdiff
path: root/src/runscript.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-12-14 12:23:13 +0000
committerRoy Marples <roy@marples.name>2007-12-14 12:23:13 +0000
commitb73bd04cf3f19b47480c85dd58e63eef5900fa3c (patch)
treeafffd113e089a7f3db06e3ef696499ab0170140f /src/runscript.c
parentf8db842dd2e93c37a5287beefeb425ae98dcdb4a (diff)
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.
Diffstat (limited to 'src/runscript.c')
-rw-r--r--src/runscript.c7
1 files changed, 4 insertions, 3 deletions
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);