diff options
author | Roy Marples <roy@marples.name> | 2007-04-11 14:52:13 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-04-11 14:52:13 +0000 |
commit | aff7b02dcebd268539cd440d608c6d8e51e62263 (patch) | |
tree | 58420244e34483b908303060f5c3877b0cd3763c /src | |
parent | e6674b2caee26d2421215d29977cb91d5731ec8a (diff) |
Fix hotplugging of network cards
Diffstat (limited to 'src')
-rw-r--r-- | src/runscript.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runscript.c b/src/runscript.c index 76ecd586..8f479771 100644 --- a/src/runscript.c +++ b/src/runscript.c @@ -425,7 +425,8 @@ static void svc_start (const char *service, bool deps) depoptions |= RC_DEP_STRICT; if (rc_is_env ("IN_HOTPLUG", "1") || in_background) { - if (! rc_service_state (service, rc_service_inactive)) + if (! rc_service_state (service, rc_service_inactive) && + ! rc_service_state (service, rc_service_stopped)) exit (EXIT_FAILURE); background = true; } @@ -631,7 +632,8 @@ static void svc_stop (const char *service, bool deps) exit (EXIT_FAILURE); if (rc_is_env ("IN_HOTPLUG", "1") || in_background) - if (! rc_service_state (service, rc_service_started)) + if (! rc_service_state (service, rc_service_started) && + ! rc_service_state (service, rc_service_inactive)) exit (EXIT_FAILURE); if (rc_service_state (service, rc_service_stopped)) |