Ticket #33 (closed enhancement: worksforme)
Opened 2 years ago
Last modified 2 years ago
RC_DEPEND_STRICT is ignored for "need net"
Reported by: | Renato Caldas <seventhguardian@gmail.com> | Owned by: | roy |
---|---|---|---|
Priority: | trivial | Milestone: | |
Component: | rc | Version: | |
Keywords: | Cc: |
Description
I have two interfaces, wired eth0 and wireless wlan0, and don't want to use both at the same time.
I have RC_DEPEND_STRICT="no" in my /etc/conf.d/rc, and I'm using latest git OpenRC .
When starting services that "need net", they want both network interfaces to be up, disregarding my RC_DEPEND_STRICT setting.
This problem is not present for "use net" services.
Change History
comment:1 Changed 2 years ago by Renato Caldas <seventhguardian@gmail.com>
- Summary changed from RC_DEPEND_STRICT is ignored for net to RC_DEPEND_STRICT is ignored for "need net"
comment:177 Changed 2 years ago by roy
- Status changed from new to resolved
- Resolution set to worksforme
You'll need to use rc_depend_strict=NO in /etc/rc.conf and remove both net.eth0 and net.wlan0 from the default runlevels and allow them to be coldplugged to get the functionality you want.
comment:219 Changed 2 years ago by Renato Caldas <seventhguardian@gmail.com>
- Status changed from resolved to reopened
- Resolution worksforme deleted
You're right. It works this way for my eth0 and wlan0 interfaces.
BUT, once I've decided to update my little server to this, I found out that openrc doesn't coldboot net.ppp0. I need to add it to a runlevel, but then if I stop it every service that depends upon net will go down.
So I'm stuck with either start-at-boot ppp and "broken" stop, or manual start and proper stop.
comment:220 Changed 2 years ago by roy
- Status changed from reopened to resolved
- Resolution set to worksforme
So you need to stop the net.ppp0 script from providing net. You can do this like so in /etc/conf.d/net or /etc/rc.conf
rc_net_ppp0_provide="!net"
If you can think of a better way to document this other than the runscript man page or net.example document I'm all ears :)
comment:297 Changed 2 years ago by Roger <roger@eskimo.com>
FYI: net.eth0 and net.wlan0 here. I used rc_depend_strict=NO as mentioned, but I had to add net.eth0 and net.wlan0 to a runlevel (ie. default) in order for "need net" services to execute.
Cheers! Working now here. ;-)
comment:299 Changed 2 years ago by roy
comment:382 Changed 2 years ago by roy
Just a heads up to say that the next version of OpenRC (either 0.2.6 or 0.3.0) will evaluate running services first, which means you should no longer need to remove the net provision with rc_depend_strict=NO.