aboutsummaryrefslogtreecommitdiff
path: root/src/rc.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/rc.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/rc.c')
-rw-r--r--src/rc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rc.c b/src/rc.c
index 8da70598..ae463bed 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -803,6 +803,7 @@ int main (int argc, char **argv)
DIR *dp;
struct dirent *d;
bool parallel;
+ int regen = 0;
atexit (cleanup);
if (argv[0])
@@ -1105,7 +1106,7 @@ int main (int argc, char **argv)
}
/* Load our deptree now */
- if ((deptree = _rc_deptree_load ()) == NULL)
+ if ((deptree = _rc_deptree_load (&regen)) == NULL)
eerrorx ("failed to load deptree");
/* Clean the failed services state dir now */
@@ -1437,7 +1438,6 @@ int main (int argc, char **argv)
}
#endif
-
STRLIST_FOREACH (start_services, service, i) {
if (rc_service_state (service) & RC_SERVICE_STOPPED) {
pid_t pid;
@@ -1502,6 +1502,12 @@ interactive_option:
unlink (INTERACTIVE);
}
+ /* If we're in the boot runlevel and we regenerated our dependencies
+ * we need to delete them so that they are regenerated again in the
+ * default runlevel as they may depend on things that are now available */
+ if (regen && strcmp (runlevel, bootlevel) == 0)
+ unlink (RC_DEPTREE);
+
return (EXIT_SUCCESS);
}