diff options
author | Bill Nottingham <notting@redhat.com> | 2002-04-19 16:34:53 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2002-04-19 16:34:53 +0000 |
commit | 4732fcfae33ca085284cca2aca45978e549b246a (patch) | |
tree | babfac2919d8716a6ea5145a3b49a2726ad2c754 /sysconfig/network-scripts | |
parent | 3d5af5ca44e1b767f2f86d5a5b0b0d722c9687ca (diff) | |
download | initscripts-4732fcfae33ca085284cca2aca45978e549b246a.tar initscripts-4732fcfae33ca085284cca2aca45978e549b246a.tar.gz initscripts-4732fcfae33ca085284cca2aca45978e549b246a.tar.bz2 initscripts-4732fcfae33ca085284cca2aca45978e549b246a.tar.xz initscripts-4732fcfae33ca085284cca2aca45978e549b246a.zip |
bulletproof it - handle both locationsr6-67
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index bcbab1f0..a646ff70 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -70,8 +70,13 @@ fi retcode=0 if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then [ -n "`pidof -x dhcpcd`" ] && { - kill `cat /etc/dhcpc/dhcpcd-${DEVICE}.pid` - retcode=$? + if [ -f "/etc/dhcpc/dhcpcd-${DEVICE}.pid" ]; then + kill `cat /etc/dhcpc/dhcpcd-${DEVICE}.pid` >/dev/null 2>&1 + retcode=$? + elif [ -f "/var/run/dhcpcd-${DEVICE}.pid" ]; then + kill `cat /var/run/dhcpcd-${DEVICE}.pid` >/dev/null 2>&1 + retcode=$? + fi } [ -n "`pidof -x pump`" ] && { pump -r -i ${DEVICE} |