Summary: | dhcpcd should execute /etc/dhcpc/dhcpcd.exe if it's going to override -c | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Daniel Ceregatti <vi> |
Component: | Current packages | Assignee: | Roy Marples (RETIRED) <uberlord> |
Status: | VERIFIED TEST-REQUEST | ||
Severity: | normal | ||
Priority: | High | ||
Version: | 2005.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | allows the use of the -c dhcpcd option |
Description
Daniel Ceregatti
2005-10-06 20:51:30 UTC
I've really missed the point of this bug... the wrapper script is in /lib/rcscripts/net.modules.d/helpers.d/dhcpcd-wrapper and dhcpcd calls it w/ -c option as per man page. Closing INVALID. It seems that you've missed my point. Let me give you a real world scenario: My machine at home uses dhcp to get its IP address from my cable modem provider. In the past, I've used the dhcpcd.exe file (per the man page) to 1) update my host name against my dyndns, 2) setup my somewhat complicated ipsec tunnel to my office, and 3) run my iptables script to reflect the new IP. This was actually working in gentoo, but then suddenly stopped working, because of the bug I've reported here. So, unless gentoo provides me the ability to always run a script when my dhcp comes up, I'm going to insist that this is a bug. So how about a few suggestions: 1) Make /lib/rcscripts/net.modules.d/helpers.d/dhcpcd-wrapper shell out to /etc/dhcpc/dhcpcd.exe, if present and executable, with the expected arguments. 2) Provide some sort of facility in /etc/conf.d/net to execute an arbitrary script when dhcp, be it dhcpcd or dhclient or whatever, obtains a new IP address. Thoughts? http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=5#doc_chap1 You can write a postup() function in /etc/conf.d/net which would work just as well and would work for all dhcp clients (dhcpcd isn't the only choice). Example postup() { local ip=$( interface_get_address "${IFACE}" ) # Strip the CIDR part returned by baselayout-1.12.0 ip="${ip%%/*}" register_dns_program "${ip}" $( hostname ) } Of course, we can always let the dhcpcd wrapper run a script as well Created attachment 70227 [details, diff]
allows the use of the -c dhcpcd option
Please test the above patch against baselayout-1.12.0_pre8 and tell me if it works or not. Thanks! The patch didn't apply cleanly to baselayout-1.12.0_pre8-r2, which seems to be the latest ~x86. If you provide such a patch, I'll gladly test it. pre9 is now in portage with this patch included I'll test it once baselayout-1.12.0_pre9 hits portage and report back here. Works great. Thanks. Oops, clicked the wrong radio button. |