From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH] dhcpcd: new pid path for dhcpcd 9.x Date: Sun, 19 Apr 2020 15:24:02 +0200 Message-ID: <20200419132402.26052-1-arne_f@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9067379004462399063==" List-Id: --===============9067379004462399063== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable dhcpcd 9.x move the path of the pids to an own folder. Signed-off-by: Arne Fitzenreiter --- src/initscripts/networking/functions.network | 2 +- src/initscripts/networking/red | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/initscripts/networking/functions.network b/src/initscripts/n= etworking/functions.network index 17191e7a9..b7ce1c5e0 100644 --- a/src/initscripts/networking/functions.network +++ b/src/initscripts/networking/functions.network @@ -25,7 +25,7 @@ dhcpcd_get_pid() { # network device, if a pidfile exists. =20 local device=3D"$1" - local pidfile=3D"/var/run/dhcpcd-${device}.pid" + local pidfile=3D"/var/run/dhcpcd/${device}.pid" =20 # Check if a pid file exists. if [ -f "${pidfile}" ] ; then diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index e154cc8b1..db4209b44 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -228,13 +228,13 @@ case "${1}" in TYPE=3D"pppoe" fi if [ "${IPTV}" =3D=3D "enable" ]; then - PIDFILE=3D"/var/run/dhcpcd-${DEVICE}.${IPTV_VLAN}.pid" + PIDFILE=3D"/var/run/dhcpcd/${DEVICE}.${IPTV_VLAN}.pid" LEASEINFO=3D"/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 [ $? !=3D 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 =20 @@ -289,7 +289,7 @@ case "${1}" in if [ -f "$PIDFILE" ]; then ps `cat "$PIDFILE"` | grep dhcpcd > /dev/null if [ $? !=3D 0 ]; then - rm -f /var/run/dhcpcd-${DEVICE}.pid > /dev/null + rm -f /var/run/dhcpcd/${DEVICE}.pid > /dev/null fi fi =20 --=20 2.17.1 --===============9067379004462399063==--