Quote:
it's obvious you're not going to get a dhcp lease.
|
Yes, but when router will power up(or accidentally unplugged connector will be connected), I want to get lease as fast as possible. I.e I want dhcpcd to hang on interface always, regardless carrier presence.
For instance, I have two interfaces eth0 & eth1.
eth0 is connected and router on other side is up.
eth1 is connected but router on other side is down(or the same, if connector is unplugged).
When running rc.inet1 during boout-up:
1) dhcpcd will get lease for eth0 interface, and there will be a process /sbin/dhcpcd -t 10 eth0 (marking as A)
2) dhcpcd will detect NO CARRIER on eth1 and shutdown itself(i.e there is will not be any /sbin/dhcpcd -t 10 eth1 (marking as B))
When on eth0 connector accidentally unplugs, or router is down - i.e. no carrier on interface, process A will wait until carrier appear and re-request lease interface.
When on eth1 connecor will be replugged(or router power up) i.e. carrier will be detected, there is no such process B to rerequest lease. So eth1 will be uninitialised forever(or at least until some admin manually restart dhcpcd for this interface).
mrclisdue
Quote:
However, this will cause the startup process to pause, waiting for the lease; if this *isn't* the desired behaviour
|
No, it is not desired behaviour. System should start regardless interface states.
cron was first solution I have considered, but then I have thought a little "WTF? Why something else should do dhcpcd's work?"
Now I have found -b switch, which forks dhcpcd immediately regardless interface, but I prefer it to fork only after first retry failed, so I will see it in boot log. Is it possible? Tried both -b -B together but it stucks on carrier detection forever.
Anyway I very disappointed why this switch does not included into rc.inet1 by default. Such state reduces usability of Slackware as out-of-box blank system for different usage cases(i.e requires one more patch need to be applied before setup other business applications).