aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPreston Brown <pbrown@redhat.com>2002-04-17 00:42:33 +0000
committerPreston Brown <pbrown@redhat.com>2002-04-17 00:42:33 +0000
commitba1d3de34745e4f79bec5aa786f527c537d440de (patch)
tree5ae36acfc8c990f72834c0612253494783f58f33
parent82da2296fe18b8267e26f78f6b6d8042db4a9cc9 (diff)
downloadinitscripts-ba1d3de34745e4f79bec5aa786f527c537d440de.tar
initscripts-ba1d3de34745e4f79bec5aa786f527c537d440de.tar.gz
initscripts-ba1d3de34745e4f79bec5aa786f527c537d440de.tar.bz2
initscripts-ba1d3de34745e4f79bec5aa786f527c537d440de.tar.xz
initscripts-ba1d3de34745e4f79bec5aa786f527c537d440de.zip
make sure that PID file exists and is readable before trying to read from it.
CVS ----------------------------------------------------------------------
-rwxr-xr-xsysconfig/network-scripts/ifdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index bf9c9e9f..6aa00b61 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -69,7 +69,7 @@ fi
retcode=0
if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
- [ -n "`pidof -x dhcpcd`" ] && {
+ [ -n "`pidof -x dhcpcd`" && -r "/var/run/dhcpcd-${DEVICE}.pid" ] && {
kill `cat /var/run/dhcpcd-${DEVICE}.pid`
retcode=$?
}