summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dhcp')
-rw-r--r--src/lib/dhcp/dhclient4
-rw-r--r--src/lib/dhcp/dhcpcd4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/dhcp/dhclient b/src/lib/dhcp/dhclient
index 5dc637c..0970aee 100644
--- a/src/lib/dhcp/dhclient
+++ b/src/lib/dhcp/dhclient
@@ -8,12 +8,10 @@ dhclient_start() {
*) return 1;;
esac
[[ $2 == "noaddr" ]] && options+=" -S"
- rm -f "$pidfile"
- if ! do_debug dhclient -$1 -q -e "TIMEOUT=${TimeoutDHCP:-30}" -pf "$pidfile" $options "$Interface"; then
+ if ! do_debug do_readable dhclient -$1 -q -e "TIMEOUT=${TimeoutDHCP:-30}" -pf "$pidfile" $options "$Interface"; then
report_error "DHCP IPv$1 lease attempt failed on interface '$Interface'"
return 1
fi
- chmod 644 "$pidfile"
}
dhclient_stop() {
diff --git a/src/lib/dhcp/dhcpcd b/src/lib/dhcp/dhcpcd
index c729c08..5107819 100644
--- a/src/lib/dhcp/dhcpcd
+++ b/src/lib/dhcp/dhcpcd
@@ -5,16 +5,14 @@ dhcpcd_start() {
report_error "Using 'dhcpcd' for IPv6 is currently not possible in netctl"
return 1
fi
- rm -f "/run/dhcpcd-$Interface".{pid,cache}
# If using own dns, tell dhcpcd to NOT replace resolv.conf
[[ $DNS ]] && DhcpcdOptions+=" -C resolv.conf"
- do_debug dhcpcd -4qL -t "${TimeoutDHCP:-30}" $DhcpcdOptions "$Interface" |& report_debug "$(cat)"
+ do_debug do_readable dhcpcd -4qL -t "${TimeoutDHCP:-30}" $DhcpcdOptions "$Interface" |& report_debug "$(cat)"
# The first array value of PIPESTATUS is the exit status of dhcpcd
if (( PIPESTATUS != 0 )); then
report_error "DHCP IP lease attempt failed on interface '$Interface'"
return 1
fi
- chmod 644 "/run/dhcpcd-$Interface.pid"
}
dhcpcd_stop() {