summaryrefslogtreecommitdiff
path: root/src/librc/librc-depend.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-02-03 23:27:16 +0000
committerRoy Marples <roy@marples.name>2008-02-03 23:27:16 +0000
commit08a5bdbcb3462ea6ba5d97e86ce44d1d26b627e0 (patch)
tree9113a90caf798d85f231d83722c7e14697526e9b /src/librc/librc-depend.c
parent93e310172575b0fe061d4ea4da912019c00bab6c (diff)
downloadopenrc-08a5bdbcb3462ea6ba5d97e86ce44d1d26b627e0.tar.gz
openrc-08a5bdbcb3462ea6ba5d97e86ce44d1d26b627e0.tar.bz2
openrc-08a5bdbcb3462ea6ba5d97e86ce44d1d26b627e0.tar.xz
RC_DEP_START/STOP should only be used for ordering services, and not the actual dependencies ofthe services themselves. This allows coldplugged services to satisfy the net dependency for rc ordering them correctly but not for services that require net and strict is on.
Diffstat (limited to 'src/librc/librc-depend.c')
-rw-r--r--src/librc/librc-depend.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c
index d74fd34..5928434 100644
--- a/src/librc/librc-depend.c
+++ b/src/librc/librc-depend.c
@@ -310,13 +310,15 @@ static char **get_provided (const rc_depinfo_t *deptree,
return (providers.list);
}
- /* If we're strict, then only use what we have in our runlevel
- * and bootlevel */
- if (options & RC_DEP_STRICT)
+ /* If we're strict or startng, then only use what we have in our
+ * runlevel and bootlevel. If we starting then check cold-plugged too. */
+ if (options & RC_DEP_STRICT || options & RC_DEP_START)
{
STRLIST_FOREACH (dt->services, service, i)
if (rc_service_in_runlevel (service, runlevel) ||
- rc_service_in_runlevel (service, bootlevel))
+ rc_service_in_runlevel (service, bootlevel) ||
+ (options & RC_DEP_START &&
+ rc_service_state (service) & RC_SERVICE_COLDPLUGGED))
rc_strlist_add (&providers.list, service);
if (providers.list)