diff options
author | Roy Marples <roy@marples.name> | 2007-12-14 12:23:13 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-12-14 12:23:13 +0000 |
commit | b73bd04cf3f19b47480c85dd58e63eef5900fa3c (patch) | |
tree | afffd113e089a7f3db06e3ef696499ab0170140f /src/rc.c | |
parent | f8db842dd2e93c37a5287beefeb425ae98dcdb4a (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.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 (®en)) == 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); } |