Summary: | Patch: Modified init.d/net.eth0 for fast IP assignment via DHCP for non-authoritative servers | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Tim Weber <scy-bugs-gentoo> |
Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | radek |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch for /etc/init.d/net.eth0
Patch for /etc/conf.d/net (new variable plus comments) Patch for /etc/init.d/net.eth0 (new version) Patch for /etc/init.d/net (new version) |
Description
Tim Weber
2004-06-07 02:12:07 UTC
Created attachment 32840 [details, diff]
Patch for /etc/init.d/net.eth0
Created attachment 32841 [details, diff]
Patch for /etc/conf.d/net (new variable plus comments)
It looks like your second patch is reversed. Also "requesting" rather than "demanding" might be better? :-) Created attachment 32847 [details, diff]
Patch for /etc/init.d/net.eth0 (new version)
net.eth0 changed recently, updated the patch.
Created attachment 32848 [details, diff]
Patch for /etc/init.d/net (new version)
You were right, the patch was reversed. Also changed "demanding" to
"requesting".
Comment on attachment 32840 [details, diff]
Patch for /etc/init.d/net.eth0
Forgot to change this to obsolete... Ahhh, damn.
Hi Tim, Thanks a bunch for the suggestion and patch. Recent versions of baselayout (>=1.9.0) include some functions that can be defined in /etc/conf.d/net for situations like this. I've just committed some changes to cvs to include documentation in /etc/conf.d/net for the functions. Here is an example that would solve the problem for you: preup() { einfo "Clearing cached IP for ${1}" if [[ -f "/var/cache/dhcpcd-${1}.cache" ]]; then rm "/var/cache/dhcpcd-${1}.cache" fi return 0 # important } Hope that helps. I don't think this should warrant another configuration variable specifically for this purpose, though. Why not make this a default behaviour? because it's non-standard ? Exactly, it's nonstandard and keeping the IP is quite useful in some cases (e.g. if the DHCP doesn't have fixed IPs per MAC address you can keep the same IP for a very long time). Thanks to Aron for the information about preup(). But although I think that this function is a very good idea, forcing hundreds (or even thousands, who knows) of users to write the same commands inside their rcscripts to get IP cache clearing is IMO not the right decision, since it is not user friendly at all. I would do it just in the other direction: Make conf.d/net more powerful by including stuff like IP cache clearing and even WEP keys in there, but don't force users to write their stuff by themselves. That way, users with less knowledge of how to script stuff will have it easier to make their changes. Additionally, this would be good for "power users" as well, since they can rely on the fact that the stuff written in the rc-scripts is secure and can be run as root without danger. I don't know what Gentoo's policy is on this subject, therefore I'll leave this bug closed for now. But if we should decide to become more user friendly, there is a great chance for this patch to get applied. What do you think? |