From 326cfb83b80103d90ad6ded579592ada22416f6d Mon Sep 17 00:00:00 2001 From: Ivan Shapovalov Date: Tue, 2 Oct 2012 21:50:56 +0400 Subject: Include "-pf" when shutting down an ethernet connection with dhclient. Executing "dhclient -x" also needs option "-pf" and a PID-file. Signed-off-by: Ivan Shapovalov --- src/connections/ethernet | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/connections') diff --git a/src/connections/ethernet b/src/connections/ethernet index 94c04a1..33aae2f 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -229,8 +229,8 @@ ethernet_down() { if [[ "$IP" == "dhcp" ]]; then if checkyesno "${DHCLIENT:-no}"; then if [[ -f "/run/dhclient-$INTERFACE.pid" ]]; then - report_debug ethernet_down dhclient -q -x "$INTERFACE" - dhclient -q -x "$INTERFACE" &>/dev/null + report_debug ethernet_down dhclient -q -x "$INTERFACE" -pf "/run/dhclient-$INTERFACE.pid" + dhclient -q -x "$INTERFACE" -pf "/run/dhclient-$INTERFACE.pid" &>/dev/null #dhclient -q -r "$INTERFACE" &>/dev/null fi else @@ -242,8 +242,8 @@ ethernet_down() { fi if [[ "$IP6" == dhcp* ]]; then if [[ -f "/run/dhclient6-$INTERFACE.pid" ]]; then - report_debug ethernet_down dhclient -6 -q -x "$INTERFACE" - dhclient -6 -q -x "$INTERFACE" &>/dev/null + report_debug ethernet_down dhclient -6 -q -x "$INTERFACE" -pf "/run/dhclient6-$INTERFACE.pid" + dhclient -6 -q -x "$INTERFACE" -pf "/run/dhclient6-$INTERFACE.pid" &>/dev/null report_debug ethernet_down /bin/kill $(< /run/dhclient6-$INTERFACE.pid) /bin/kill $(< /run/dhclient6-$INTERFACE.pid) &>/dev/null fi -- cgit v1.2.3-24-g4f1b