]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
dhcpcd: new pid path for dhcpcd 9.x
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 19 Apr 2020 13:24:02 +0000 (15:24 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 19 Apr 2020 17:27:12 +0000 (17:27 +0000)
dhcpcd 9.x move the path of the pids to an own folder.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/networking/functions.network
src/initscripts/networking/red

index 17191e7a9cec497dd0359728ed3f3c8dfdbfc23c..b7ce1c5e0d58b78f7e749f2a588b5a50c8f9ef0b 100644 (file)
@@ -25,7 +25,7 @@ dhcpcd_get_pid() {
                # network device, if a pidfile exists.
 
                local device="$1"
-               local pidfile="/var/run/dhcpcd-${device}.pid"
+               local pidfile="/var/run/dhcpcd/${device}.pid"
 
                # Check if a pid file exists.
                if [ -f "${pidfile}" ] ; then
index e154cc8b1133e5aa2b6d83fd7417a6dbdf4002ad..db4209b44083d3aded65743bd94a1cd6d3f46380 100644 (file)
@@ -228,13 +228,13 @@ case "${1}" in
                                TYPE="pppoe"
                        fi
                        if [ "${IPTV}" == "enable" ]; then
-                               PIDFILE="/var/run/dhcpcd-${DEVICE}.${IPTV_VLAN}.pid"
+                               PIDFILE="/var/run/dhcpcd/${DEVICE}.${IPTV_VLAN}.pid"
                                LEASEINFO="/var/ipfire/dhcpc/dhcpcd-${DEVICE}.${IPTV_VLAN}.info"
                                # Test to see if there is a stale pid file
                                if [ -f "$PIDFILE" ]; then
                                        ps `cat "$PIDFILE"` | grep dhcpcd > /dev/null
                                        if [ $? != 0 ]; then
-                                               rm -f /var/run/dhcpcd-${DEVICE}.${IPTV_VLAN}.pid > /dev/null
+                                               rm -f /var/run/dhcpcd/${DEVICE}.${IPTV_VLAN}.pid > /dev/null
                                        fi
                                fi
 
@@ -289,7 +289,7 @@ case "${1}" in
                                                if [ -f "$PIDFILE" ]; then
                                                        ps `cat "$PIDFILE"` | grep dhcpcd > /dev/null
                                                        if [ $? != 0 ]; then
-                                                               rm -f /var/run/dhcpcd-${DEVICE}.pid > /dev/null
+                                                               rm -f /var/run/dhcpcd/${DEVICE}.pid > /dev/null
                                                        fi
                                                fi