Allow !net to remove the net provision from dependencies.
This commit is contained in:
parent
0c75e888fc
commit
51a9c647b9
@ -85,9 +85,14 @@ net_fs_list="afs cifs coda davfs fuse gfs ncpfs nfs nfs4 ocfs2 shfs smbfs"
|
||||
#rc_use="net.eth0"
|
||||
#rc_after="clock"
|
||||
#rc_before="local"
|
||||
#rc_provide="!net"
|
||||
|
||||
# You can also enable the above commands here for each service. Below is an
|
||||
# example for service foo.
|
||||
#rc_foo_config="/etc/foo"
|
||||
#rc_foo_need="openvpn"
|
||||
#rc_foo_after="clock"
|
||||
|
||||
# You can also remove dependencies.
|
||||
# This is mainly used for saying which servies do NOT provide net.
|
||||
#rc_net_tap0_provide="!net"
|
||||
|
@ -114,7 +114,8 @@ will start and stop it in the right order in relation to other services.
|
||||
As it's a function it can be very flexable, see the example below.
|
||||
Here is a list of the functions you can use in a
|
||||
.Ic depend
|
||||
function. You simply pass the names of the services to it.
|
||||
function. You simply pass the names of the services to it to add to that
|
||||
dpendency type, or prefix it with ! to remove it.
|
||||
.Bl -tag -width "RC_DEFAULTLEVEL"
|
||||
.It Ic need
|
||||
The service will refuse to start until needed services have started and it
|
||||
|
@ -833,6 +833,12 @@ bool rc_deptree_update (void)
|
||||
depend[len - 1] == 'h')
|
||||
continue;
|
||||
|
||||
/* Remove our dependency if instructed */
|
||||
if (depend[0] == '!') {
|
||||
rc_strlist_delete (&deptype->services, depend + 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
rc_strlist_addsort (&deptype->services, depend);
|
||||
|
||||
/* We need to allow `after *; before local;` to work.
|
||||
|
Loading…
Reference in New Issue
Block a user