Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpcd shows running in ps - how to disable on boot up?
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
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 983

PostPosted: Sat Jul 13, 2019 4:50 am    Post subject: dhcpcd shows running in ps - how to disable on boot up? Reply with quote

Without uninstalling, how can I keep dhcpcd from running? I see that rc-update is not bringing it up on the default level. I am using static ip address successfully with:

Code:
localhost /home/one # cat /etc/conf.d/net
config_enp37s0="192.168.1.5"
routes_enp37s0=("192.168.1.50"
             "default via 192.168.1.50"
)


Code:

localhost /home/one # ps -elf | grep -i dhcpcd
5 S root      4088     1  0  80   0 -  1260 do_epo 23:44 ?        00:00:00 /sbin/dhcpcd -q

_________________
<h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5>
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 18335

PostPosted: Sat Jul 13, 2019 5:49 am    Post subject: Reply with quote

Code:
grep -Ri dhcpcd /etc/init.d/
Should show other services that reference it.

Or maybe something in /etc/conf.d/net.
_________________
Don't even pause and ask them why. Turn around and say goodbye.
Back to top
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 983

PostPosted: Sat Jul 13, 2019 2:59 pm    Post subject: Reply with quote

This is what I have here:

Code:

localhost /home/one # grep -Ri dhcpcd /etc/init.d/
/etc/init.d/dhcpcd:command=/sbin/dhcpcd
/etc/init.d/dhcpcd:pidfile=/var/run/dhcpcd.pid
localhost /home/one # /etc/init.d/dhcpcd status
 * status: started
localhost /home/one # rc-update delete  dhcpcd default
 * rc-update: service `dhcpcd' is not in the runlevel `default'
localhost /home/one # /etc/init.d/net.lo status
 * status: stopped
localhost /home/one #


Strange, the ethernet device enp37s0 comes up automatically on boot even though /etc/init.d/net.lo, which is softlinked to it, is not running. Is this because netmount it running? Could netmount be bringing up dhcpcd also?
_________________
<h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5>
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44900
Location: 56N 3W

PostPosted: Sat Jul 13, 2019 3:32 pm    Post subject: Reply with quote

dman777,

dhcpcd will run for any interfaces listed in /etc/init.d/ that do not have an entry in /etc/conf.d/net.
net.lo should always be up. Horrible things happen to Xorg otherwise.

netmount will try to start networking, if its not already started.
Exacty what "start networking" means depends on the content of /etc/rc.conf

If you don't have any network filesystems listed in /etc/fstab then netmount is not needed.

-- edit --

/etc/init.d/net.lo is a real script. Its run as whatever calls it, so for a symlink net.eth0 -> net.lo it runs as net.eth0 and so on.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 983

PostPosted: Sat Jul 13, 2019 3:54 pm    Post subject: Reply with quote

ah.... makes sense now! Thank you both for the help!
_________________
<h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5>
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7367

PostPosted: Sat Jul 13, 2019 4:02 pm    Post subject: Reply with quote

NeddySeagoon wrote:
net.lo should always be up. Horrible things happen to Xorg otherwise.

NeddySeagoon made horrible mistake with net.lo service and lo the local network :)

net.lo should not be not start, because it's only use by another interface (eth0...) and not used directly, it's an utility script.
i think the name comes because originaly net.lo was starting loopback, but it's handle by the service "loopback" now (which should be in boot runlevel), and nobody has think changing net.lo name to "imutilityforotherinteraces" would be useful.

so lo, loopback or 127.0.0.1 interface should always be up, and it's handle by "loopback" service, while net.lo is of no use (for anyone?) directly.

if you have another interface that is not refered in conf.d/net then dhcpcd will handle it, in order to prevent this, create an entry for that interface asking it to do nothing (or forcing it to use some dummy fixed ip address)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44900
Location: 56N 3W

PostPosted: Sat Jul 13, 2019 8:50 pm    Post subject: Reply with quote

krinn,

Just as you get to grips with these things, they change under you. :)
Maybe I'm just out of date.
Code:
$ rc-update show
               ...               
               net.lo | boot
               ...           

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3749
Location: Hamburg

PostPosted: Sat Jul 13, 2019 9:21 pm    Post subject: Reply with quote

Unbelievable, /me still had net.lo in runlevel default over the last 5 years - removed it now.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7367

PostPosted: Sun Jul 14, 2019 9:20 am    Post subject: Reply with quote

Another proof the forum is a golden tool if anyone need any :)
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