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.
This commit is contained in:
parent
93e3101725
commit
08a5bdbcb3
@ -310,13 +310,15 @@ static char **get_provided (const rc_depinfo_t *deptree,
|
|||||||
return (providers.list);
|
return (providers.list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we're strict, then only use what we have in our runlevel
|
/* If we're strict or startng, then only use what we have in our
|
||||||
* and bootlevel */
|
* runlevel and bootlevel. If we starting then check cold-plugged too. */
|
||||||
if (options & RC_DEP_STRICT)
|
if (options & RC_DEP_STRICT || options & RC_DEP_START)
|
||||||
{
|
{
|
||||||
STRLIST_FOREACH (dt->services, service, i)
|
STRLIST_FOREACH (dt->services, service, i)
|
||||||
if (rc_service_in_runlevel (service, runlevel) ||
|
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);
|
rc_strlist_add (&providers.list, service);
|
||||||
|
|
||||||
if (providers.list)
|
if (providers.list)
|
||||||
|
@ -674,9 +674,6 @@ static void svc_start (bool deps)
|
|||||||
if (rc_conf_yesno ("rc_depend_strict"))
|
if (rc_conf_yesno ("rc_depend_strict"))
|
||||||
depoptions |= RC_DEP_STRICT;
|
depoptions |= RC_DEP_STRICT;
|
||||||
|
|
||||||
if (rc_runlevel_starting ())
|
|
||||||
depoptions |= RC_DEP_START;
|
|
||||||
|
|
||||||
if (deps) {
|
if (deps) {
|
||||||
if (! deptree && ((deptree = _rc_deptree_load (NULL)) == NULL))
|
if (! deptree && ((deptree = _rc_deptree_load (NULL)) == NULL))
|
||||||
eerrorx ("failed to load deptree");
|
eerrorx ("failed to load deptree");
|
||||||
@ -892,9 +889,6 @@ static void svc_stop (bool deps)
|
|||||||
if (rc_conf_yesno ("rc_depend_strict"))
|
if (rc_conf_yesno ("rc_depend_strict"))
|
||||||
depoptions |= RC_DEP_STRICT;
|
depoptions |= RC_DEP_STRICT;
|
||||||
|
|
||||||
if (rc_runlevel_stopping ())
|
|
||||||
depoptions |= RC_DEP_STOP;
|
|
||||||
|
|
||||||
if (! deptree && ((deptree = _rc_deptree_load (NULL)) == NULL))
|
if (! deptree && ((deptree = _rc_deptree_load (NULL)) == NULL))
|
||||||
eerrorx ("failed to load deptree");
|
eerrorx ("failed to load deptree");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user