Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I prevent any networking from starting?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1523

PostPosted: Wed Dec 03, 2014 6:57 am    Post subject: How do I prevent any networking from starting? Reply with quote

Thought I understood this (apparently not). :(

/etc/rc.conf contains:

Code:

rc_depend_strict='NO'
rc_hotplug='!net.net0 !net.net1'


And nothing in the runlevels should be starting it:

Code:

# rc-status -a
Runlevel: sysinit
 devfs                                  [  started  ]
 dmesg                                  [  started  ]
 kmod-static-nodes                      [  started  ]
 sysfs                                  [  started  ]
 tmpfiles.dev                           [  started  ]
 udev                                   [  started  ]
 udev-mount                             [  started  ]
Runlevel: boot
 alsasound                              [  started  ]
 bootmisc                               [  started  ]
 consolefont                            [  started  ]
 fsck                                   [  started  ]
 hibernate-cleanup                      [  started  ]
 hostname                               [  started  ]
 hwclock                                [  started  ]
 keymaps                                [  started  ]
 localmount                             [  started  ]
 loopback                               [  started  ]
 modules                                [  started  ]
 mtab                                   [  started  ]
 net.lo                                 [  started  ]
 procfs                                 [  started  ]
 root                                   [  started  ]
 swap                                   [  started  ]
 swapfiles                              [  started  ]
 sysctl                                 [  started  ]
 termencoding                           [  started  ]
 tmpfiles.setup                         [  started  ]
 urandom                                [  started  ]
Runlevel: default
 cupsd                                  [  started  ]
 dbus                                   [  started  ]
 hdparm                                 [  started  ]
 local                                  [  started  ]
 netmount                               [  stopped  ]
 smartd                                 [  started  ]
 syslog-ng                              [  started  ]
 vixie-cron                             [  started  ]
 xdm                                    [  started  ]
 xdm-setup                              [  started  ]
Runlevel: shutdown
 killprocs                              [  stopped  ]
 mount-ro                               [  stopped  ]
 savecache                              [  stopped  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed
Dynamic Runlevel: manual


But in the startup log, I see:

Code:

dhcpcd[1108]: version 6.4.7 starting
dhcpcd[1108]: dev: loaded udev
dhcpcd[1108]: net0: adding address fe80::1443:409f:422f:52dd
dhcpcd[1108]: net1: adding address fe80::8100:f4af:f2a7:bf52
dhcpcd[1138]: net1: starting wpa_supplicant
dhcpcd[1108]: no interfaces have a carrier
dhcpcd[1108]: forked to background, child pid 1161
dhcpcd[1161]: net0: waiting for carrier
dhcpcd[1161]: net1: waiting for carrier
dhcpcd[1161]: net1: carrier acquired
dhcpcd[1161]: DUID 00:00:00:00:00:00:00:00:00:00:00:00:00:00
dhcpcd[1161]: net1: IAID 77:37:03:fe
dhcpcd[1161]: net1: carrier lost
dhcpcd[1161]: net1: soliciting a DHCP lease


I would like to prevent any networking from starting, unless I specifically start it manually.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Wed Dec 03, 2014 8:22 am    Post subject: Re: How do I prevent any networking from starting? Reply with quote

curmudgeon wrote:
Thought I understood this (apparently not). :(

/etc/rc.conf contains:

Code:
 net.lo                                 [  started  ]
Maybe it's triggered by starting net.lo?
Back to top
View user's profile Send private message
WWWW
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2014
Posts: 143

PostPosted: Wed Dec 03, 2014 9:59 am    Post subject: Reply with quote

I would remove these two from runlevels:

netmount
dbus

And see what happens.

One more thing you could try is to unlink net.ethX or net.enpXXX to net.lo in /etc/init.d/.

Lastly set your interface to null in /etc/conf.d/net

config_eth0="null"

I don't know if this would be an overkill but adding !dhcpcd !ifconfig !iwconfig etc in /etc/init.d/net could help from accidental triggering.

A word on dbus. Isn't dbus linked to a myriad of services and programs? Either taking removing dbus USE flag from packages or disabling network capabilities on dbus could also help.

openrc, as odd as it seems, DEFAULTS to dhcpd, even with a BLANK /etc/conf.d/net. Quite odd given the nature of configurability of gentoo. And even if dhcpcd isn't installed it uses udhcp from BUSYBOX <--- WTF???
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Wed Dec 03, 2014 10:10 am    Post subject: Reply with quote

WWWW wrote:
I would remove these two from runlevels:

netmount
dbus

And see what happens.

One more thing you could try is to unlink net.ethX or net.enpXXX to net.lo in /etc/init.d/.

Lastly set your interface to null in /etc/conf.d/net

config_eth0="null"
Why not just remove all Gentoo net.* scripts stuff as from https://wiki.gentoo.org/wiki/Dhcpcd and not add dhcpcd to a runlevel?
Back to top
View user's profile Send private message
WWWW
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2014
Posts: 143

PostPosted: Wed Dec 03, 2014 10:13 am    Post subject: Reply with quote

charles17 wrote:
WWWW wrote:
I would remove these two from runlevels:

netmount
dbus

And see what happens.

One more thing you could try is to unlink net.ethX or net.enpXXX to net.lo in /etc/init.d/.

Lastly set your interface to null in /etc/conf.d/net

config_eth0="null"
Why not just remove all Gentoo net.* scripts stuff as from https://wiki.gentoo.org/wiki/Dhcpcd and not add dhcpcd to a runlevel?


If you notice op has no dhcpcd service in any runlevel. Secondly he is not first being hit with openrc hidden default net option.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Wed Dec 03, 2014 10:31 am    Post subject: Reply with quote

net.lo no longer provides net.
You would need to ask a Gentoo netifrc dev why they made this change, I don't know for sure.
As such, the only thing you have installed that provides net is dhcpcd as you have no other net.* scripts.
This is why dhcpcd is started, and by default it will work on what it can.

So to stop dhcpcd from starting, you need to remove the need provision from the service that needs it, or provide it again in net.lo
You can do this in /etc/rc.conf
Code:
# net.lo provides net
rc_net_lo_provide="net"

# dhcpcd does not provide net
rc_dhcpcd_provide="!net"


You maybe able to find the service that needs net as well
Code:
/etc/init.d/dhcpcd needsme
/etc/init.d/dhcpcd usesme

_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum