Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhclient and /var/run/dhcp directory
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
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1681

PostPosted: Sat Feb 23, 2013 1:27 pm    Post subject: dhclient and /var/run/dhcp directory Reply with quote

On startup dhclient tries to write a pid file into /var/run/dhcp; since /var/run
is now a tmpfs the directory doesn't exist, and the attempt fails. The solutions
seem to be either patch dhclient to make the /var/run/dhcp directory if it doesn't
exist, or create the directory at each startup in /etc/local.d. Which approach
do people usually use?

Thanks - Will
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Sat Feb 23, 2013 3:29 pm    Post subject: Re: dhclient and /var/run/dhcp directory Reply with quote

cwr wrote:
On startup dhclient tries to write a pid file into /var/run/dhcp; since /var/run is now a tmpfs the directory doesn't exist, and the attempt fails. The solutions seem to be either patch dhclient to make the /var/run/dhcp directory if it doesn't exist, or create the directory at each startup in /etc/local.d. Which approach do people usually use?

cwr ... I don't use dhclient, and so haven't encountered this issue, however I think the method of dealing with such things is via tempfiles.d. sys-apps/openrc-0.11.x brought with it /etc/init.d/tmpfiles.setup and /lib/rc/sh/tmpfiles.sh, a reimplementation of systemd's 'tmpfiles.d', I haven't looked at it and so can't provide any advice as to how it works, or how you might go about configuring it, but hopefully its a point in the right direction.

best ... khay
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1564
Location: U.S.A.

PostPosted: Fri Mar 01, 2013 1:42 am    Post subject: Reply with quote

Code:
ln -s /run /var/run

_________________
juniper wrote:
I use ubuntu, which is why I am posting here.
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Fri Mar 01, 2013 3:06 am    Post subject: Reply with quote

BoneKracker wrote:
Code:
ln -s /run /var/run

BoneKracker ... that sym-link should already exist. The issue is with whats within it (ie, nothing, as its tmpfs), and dhclient expects a dir there. That is what tempfiles-setup is now used for.

best ... khay
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1564
Location: U.S.A.

PostPosted: Fri Mar 01, 2013 5:57 am    Post subject: Reply with quote

Sorry. Just me being hasty and stupid. I wasn't aware of this and only recently stopped using dhclient on one of my machines, but it was a stable branch setup. I apologize for not reading your answer more carefully before sticking my nose in.
_________________
juniper wrote:
I use ubuntu, which is why I am posting here.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1681

PostPosted: Sat Mar 02, 2013 11:32 am    Post subject: Reply with quote

Something odd's going on, since dhclient sometimes complains and sometimes
just uses /run rather than /run/dhcp. I'll keep digging - a man page for
tmpfiles-setup would have been nice.

Thanks for the pointer - Will
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Sat Mar 02, 2013 4:22 pm    Post subject: Reply with quote

cwr wrote:
Something odd's going on, since dhclient sometimes complains and sometimes just uses /run rather than /run/dhcp.

cwr ... that doesn't sound normal to me.

cwr wrote:
I'll keep digging - a man page for tmpfiles-setup would have been nice.

The link I provided above is for the systemd implimentation, and as the openrc implimentation is 100% compatable there should be no issues following the example there.

best ... khay
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