aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1998-03-09 22:16:33 +0000
committerErik Troan <ewt@redhat.com>1998-03-09 22:16:33 +0000
commitacf879bfcc6724b43a470d7e1ffdef345a992e25 (patch)
tree2a0a725feb6ce2e9cdfeba50afd3f4f2bcda10db
parent2201e45547b42984ce740d2a1b181b919b6e6667 (diff)
downloadinitscripts-acf879bfcc6724b43a470d7e1ffdef345a992e25.tar
initscripts-acf879bfcc6724b43a470d7e1ffdef345a992e25.tar.gz
initscripts-acf879bfcc6724b43a470d7e1ffdef345a992e25.tar.bz2
initscripts-acf879bfcc6724b43a470d7e1ffdef345a992e25.tar.xz
initscripts-acf879bfcc6724b43a470d7e1ffdef345a992e25.zip
added check for mktemp failure
-rwxr-xr-xsysconfig/network-scripts/ifup5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 59d074cc..714d972c 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -77,7 +77,10 @@ if [ "$BOOTPROTO" = bootp -a "$ISALIAS" = no ]; then
ifconfig ${DEVICE} 0.0.0.0 broadcast 255.255.255.255 netmask 0.0.0.0
route add default ${DEVICE}
echo "Sending bootp request"
- TMPFILE=`/bin/mktemp /tmp/bootp-${DEVICE}.XXXXXX`
+ TMPFILE=`/bin/mktemp /tmp/bootp-${DEVICE}.XXXXXX` || {
+ echo 'mktemp failed'
+ exit 1
+ }
bootpc --returniffail --timeoutwait 6 --dev ${DEVICE} 2>/dev/null > ${TMPFILE}
if [ "$?" = "0" ]; then
. ${TMPFILE}