Signed-off-by: Allan McRae <[email protected]>
---

This seems to be the thing to do now that /var/run is a symlink to /run.
I might be missing the reason that this has not been changed and it
could break everything...

 network |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/network b/network
index b94d170..d22b5dd 100755
--- a/network
+++ b/network
@@ -51,7 +51,7 @@ network_up() {
 network_down() {
        have_interface "$interface" || return 1
 
-       if [[ -f /var/run/dhcpcd-$interface.pid ]]; then
+       if [[ -f /run/dhcpcd-$interface.pid ]]; then
                dhcpcd -k $interface || return 1
        else
                ip addr flush dev $interface || return 1
@@ -81,8 +81,8 @@ ifup() {
 
        if [[ $ifcfg = dhcp ]]; then
                # remove the .pid file if it exists
-               rm -f /var/run/dhcpcd-${1}.pid >/dev/null 2>&1
-               rm -f /var/run/dhcpcd-${1}.cache >/dev/null 2>&1
+               rm -f /run/dhcpcd-${1}.pid >/dev/null 2>&1
+               rm -f /run/dhcpcd-${1}.cache >/dev/null 2>&1
                dhcpcd $DHCPCD_ARGS ${1}
        else
                ifconfig $ifcfg
@@ -114,7 +114,7 @@ ifdown() {
                return 1
        fi
 
-       if [[ $ifcfg = dhcp && -f /var/run/dhcpcd-${1}.pid ]]; then
+       if [[ $ifcfg = dhcp && -f /run/dhcpcd-${1}.pid ]]; then
                dhcpcd -k ${1} >/dev/null 2>&1
        fi
        # Always bring the interface itself down
-- 
1.7.8.1

Reply via email to