| View previous topic :: View next topic |
| Author |
Message |
cwr Veteran

Joined: 17 Dec 2005 Posts: 1465
|
Posted: Sat Feb 23, 2013 1:27 pm Post subject: dhclient and /var/run/dhcp directory |
|
|
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 |
|
 |
khayyam Veteran


Joined: 07 Jun 2012 Posts: 1268
|
Posted: Sat Feb 23, 2013 3:29 pm Post subject: Re: dhclient and /var/run/dhcp directory |
|
|
| 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 |
|
 |
BoneKracker Veteran


Joined: 14 Mar 2006 Posts: 1488 Location: U.S.A.
|
Posted: Fri Mar 01, 2013 1:42 am Post subject: |
|
|
| Code: | | ln -s /run /var/run |
_________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
khayyam Veteran


Joined: 07 Jun 2012 Posts: 1268
|
Posted: Fri Mar 01, 2013 3:06 am Post subject: |
|
|
| 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 |
|
 |
BoneKracker Veteran


Joined: 14 Mar 2006 Posts: 1488 Location: U.S.A.
|
Posted: Fri Mar 01, 2013 5:57 am Post subject: |
|
|
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. _________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
cwr Veteran

Joined: 17 Dec 2005 Posts: 1465
|
Posted: Sat Mar 02, 2013 11:32 am Post subject: |
|
|
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 |
|
 |
khayyam Veteran


Joined: 07 Jun 2012 Posts: 1268
|
Posted: Sat Mar 02, 2013 4:22 pm Post subject: |
|
|
| 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 |
|
 |
|