View previous topic :: View next topic |
Author |
Message |
s|mon Apprentice
Joined: 04 Jul 2004 Posts: 209 Location: Bayern [de]
|
Posted: Fri May 05, 2023 5:56 am Post subject: disable network interface for startup [solved] |
|
|
I use openrc as init.
My system has two wired network interfaces (net.enp39s0, net.enp38s0) where only one is plugged in (currently enp38s0)
in /etc/rc.conf i have set
rc_hotplug="* !net.*"
Still during boot also enp39s0 is started, trying dhcp and waiting for carrier delaying boot.
I also seems to be occuring on every boot.
Is there a way to have this only started if i manually add it to a runlevel (as intended with the !hotplug). Any ideas what can be the reason, what to check?
Quote: | rc-config list | grep net
net-online
net.enp38s0 default
net.enp39s0
net.enp42s0f3u2
net.lo boot
net.wlo1
netmount default
xinetd
|
Quote: | cat /etc/conf.d/netmount | grep -v ^#
rc_need="dhcpcd"
rc_need="net.enp38s0"
|
Quote: |
Dynamic Runlevel: hotplugged
net.enp39s0 [ stopped ]
net.wlo1 [ stopped ]
net.enp38s0 [ started ]
|
From rc.log
Quote: |
* Bringing up interface enp39s0
* Caching network module dependencies
* config_enp39s0 not specified; defaulting to DHCP
* dhcp ...
* Running dhcpcd ...
dhcpcd-9.4.1 starting
DUID 00:01....26:0c
enp39s0: IAID 42:a5:3c:c3
enp39s0: adding address fe80::ac19:...:a322:5edb
enp39s0: carrier lost
enp39s0: deleting address fe80::ac19:...:a322:5edb
timed out
dhcpcd exited
[ !! ]
[ !! ]
* ERROR: net.enp39s0 failed to start
* Bringing up interface wlo1
* Starting wpa_supplicant on wlo1 ...
* start-stop-daemon: /usr/sbin/wpa_supplicant is already running
[ !! ]
* ERROR: net.wlo1 failed to start
|
Thanks a lot
s|mon
Last edited by s|mon on Fri May 05, 2023 6:58 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54244 Location: 56N 3W
|
Posted: Fri May 05, 2023 7:04 am Post subject: |
|
|
s|mon,
You need a small edit in /etc/rc.conf. Te comments will guide you. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
s|mon Apprentice
Joined: 04 Jul 2004 Posts: 209 Location: Bayern [de]
|
Posted: Fri May 05, 2023 10:58 am Post subject: |
|
|
i think/hope that it might be the order "* !net.*" should be rather "!net.* *" will test once next reboot is possible.
If that works thanks for the subtle hint ! |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1660
|
Posted: Fri May 05, 2023 12:28 pm Post subject: |
|
|
Is this physical removal of the device (not the cable)? Then continue working on this path.
If you are looking for cable detection, then just install sys-apps/netplug or sys-apps/ifplugd and they will be automatically used for cable detection. This bypasses any DHCP request when not plugged in. |
|
Back to top |
|
|
s|mon Apprentice
Joined: 04 Jul 2004 Posts: 209 Location: Bayern [de]
|
Posted: Fri May 05, 2023 6:29 pm Post subject: |
|
|
No it is just cable detection (during boot, because there it slows down startup) as both are physically on the mainboard and can not be deactived individually in BIOS (at least i did not find it).
The change worked. Will now also try netplug, thanks for the hint.
[edit] Tried netplug, works as well. Thanks! |
|
Back to top |
|
|
s|mon Apprentice
Joined: 04 Jul 2004 Posts: 209 Location: Bayern [de]
|
Posted: Mon May 15, 2023 5:51 am Post subject: |
|
|
One more point to netplug in case someone still reads this.
I observed that now with this active after a suspend resume cycle all my network nfs mounts are gone and i neet to issue 'mount -t nfs -a' to have them back.
Is there a workaround or solution for that? |
|
Back to top |
|
|
|