You are not logged in.
Hi,
when i used plain dhcpcd (systemctl enable dhcpcd@eth0) the ip address of my machine was quite stable, it re-requested the old lease on a reboot. Now i'm using netcfg-profiles (systemctl enable netcfg) and now dhcpcd will release the lease on every shutdown and thus the machine gets a new address at the next boot. How can I prevent netcfg from passing the "release" option to dhcpcd? netcfg-profiles seems only to allow for additional options and there seems to be no "norelease" option.
Greetings
[edit]Original discussion about netcfg, suggested change to netctl below.[/edit]
Last edited by Sunday87 (2013-05-30 20:55:43)
Offline
Problem solved:
cp /usr/lib/network/connections/ethernet /usr/lib/network/connections/myethernet
now edit /usr/lib/network/connections/myethernet and look for the function ethernet_down(). Comment out the line "dhcpcd -qk "$INTERFACE" &>/dev/null".
change connection in netcfg profile to "myethernet"
Offline
That's not a solution, it's a workaround. You're creating an orphan file on your system outside of pacman's control
That said.... netcfg will be deprecated soon in favour of netctl, which is currently in testing. I suggest you migrate to netctl, see if it exhibits the same behaviour, and submit an appropriate patch if it does.
Offline
I looked into netctl. It shows the same behaviour if used with dhcpcd but not with dhclient. Those commands are now in /usr/lib/network/ip (https://projects.archlinux.org/netctl.g … src/lib/ip) in the ip_unset() function and read
case ${DHCPClient:-dhcpcd} in
dhcpcd)
if [[ -f "/run/dhcpcd-$Interface.pid" ]]; then
do_debug dhcpcd -qk "$Interface" >/dev/null
fi
;;
dhclient)
if [[ -f "/run/dhclient-$Interface.pid" ]]; then
# Alternatively, use -r instead of -x to also release the lease
do_debug dhclient -q -x "$Interface" -pf "/run/dhclient-$Interface.pid" >/dev/null
fi
;;
esac
the dhcpcd line could also be changed analogously
# Alternatively, use -k instead of -x to also release the lease
do_debug dhcpcd -qx "$Interface" >/dev/null
Unfortunatly i am not sure how to submit this suggestion as a patch, maybe someone else does. I for now have added
DHCPClient=dhclient
to my network profile.
Greetings
[edit] I have just filed this as a bug report: https://bugs.archlinux.org/task/35760 [/edit]
Last edited by Sunday87 (2013-06-11 18:28:26)
Offline