Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 60845 - Dhcpcd exits after initializing interface while it should keep running
Summary: Dhcpcd exits after initializing interface while it should keep running
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 66472
  Show dependency tree
 
Reported: 2004-08-18 21:30 UTC by Alwyn Schoeman
Modified: 2004-12-04 03:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alwyn Schoeman 2004-08-18 21:30:53 UTC
When using dhcpcd, it should fork after configuring the interface and hang around.

This is not happening currently, it exits, removing the pid file that is used to test for it during net.eth0 stop, causing the system to be left in a state where resolv.conf's aren't fixed, etc.

I do not know what is causing this at present, but will investigate further.

Reproducible: Always
Steps to Reproduce:
1./etc/init.d/net.eth? start  (for your dhcp interface)
2.ps aux | grep dhcpcd
3.ls -la /var/run/dhcpcd*


Actual Results:  
No pid file and no dhcpcd process.

Expected Results:  
There should be a pid file and dhcpcd process hanging around.

I'm using the wireless.sh script from the forums as a preup.  It appears to work
properly and down's the interface before dhcpcd is called.

Dhcpcd successfully configures interface but then exits where it should not.
Comment 1 SpanKY gentoo-dev 2004-08-19 04:37:29 UTC
this usually only happens when something is wrong

check your log files to see why dhcpcd bailed

does it bail if you run it yourself ?
Comment 2 Alwyn Schoeman 2004-08-21 05:02:07 UTC
I have figured it out.

Whenever the dhcp server doesn't provide a lease period, the dhcpcd client assumes that it is infinite and as such assumes that it will not need to hang around to renew the information, thus exiting.

2 solutions:
1) Document this behaviour and leave it up to the user.
2) Have a default lease period specified in /etc/init.d/net.eth0.  (option is
-l time_in_seconds)

I'm leaning towards 1) as 2) makes decision for the user.  

Note that this behaviour is relevant when like me you alternate between a fixed network and a wireless one.  For me it must be shutdown with -z or when I get to work I sit with my resolv.conf from home.
Comment 3 SpanKY gentoo-dev 2004-08-21 23:28:40 UTC
agriffis:
perhaps add a small note in conf.d/net right after where it mentions the timeout problem ?  if not we can just punt this bug
Comment 4 Roy Marples (RETIRED) gentoo-dev 2004-11-17 07:21:43 UTC
I've documented this behaviour in net.example in CVS
Comment 5 Roy Marples (RETIRED) gentoo-dev 2004-12-04 03:56:36 UTC
Fixed in baselayout-1.11.7-r1