summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnetcfg4
-rwxr-xr-xnetwork2
2 files changed, 3 insertions, 3 deletions
diff --git a/netcfg b/netcfg
index 6582d3d..76e387c 100755
--- a/netcfg
+++ b/netcfg
@@ -52,7 +52,7 @@ stop_profile()
[ "$USEWPA" = "yes" -o "$USEWPA" = "YES" ] && wpa_cli terminate >/dev/null 2>&1
# bring down dhcpcd if we're using it
- [ "$IFOPTS" = "dhcp" -o "$IFOPTS" = "DHCP" ] && dhcpcd -k $INTERFACE
+ [ "$IFOPTS" = "dhcp" -o "$IFOPTS" = "DHCP" ] && kill `cat /etc/dhcpc/dhcpcd-${INTERFACE}.pid`
# bring down the interface itself
ifconfig $INTERFACE down
@@ -198,7 +198,7 @@ menu()
# if no default yet, use the first entry
[ "$DEFAULT" = "" ] && DEFAULT=${profiles[0]}
- ANSWER=`mktemp`
+ ANSWER=`mktemp` || exit 1
if [ "$TIMEOUT" != "" ]; then
dialog \
diff --git a/network b/network
index b3d13b9..5e33cc9 100755
--- a/network
+++ b/network
@@ -58,7 +58,7 @@ ifdown()
eval ifcfg="\$${1}"
if [ "$ifcfg" = "dhcp" ]; then
if [ -f /etc/dhcpc/dhcpcd-${1}.pid ]; then
- /sbin/dhcpcd -k ${1}
+ kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
else
# No .pid file, just bring the interface itself down
/sbin/ifconfig ${1} down