diff options
author | Donnie Barnes <djb@redhat.com> | 1997-09-23 18:33:29 +0000 |
---|---|---|
committer | Donnie Barnes <djb@redhat.com> | 1997-09-23 18:33:29 +0000 |
commit | 9c4fe21ea4dea21bbb30081b288e282ef2dce5dc (patch) | |
tree | 890897cc98a2a7a00588ab6342a25cff0fd12a50 /sysconfig/network-scripts | |
parent | b566b5698c7adba211168e2b7eac2618a6a6ca97 (diff) | |
download | initscripts-9c4fe21ea4dea21bbb30081b288e282ef2dce5dc.tar initscripts-9c4fe21ea4dea21bbb30081b288e282ef2dce5dc.tar.gz initscripts-9c4fe21ea4dea21bbb30081b288e282ef2dce5dc.tar.bz2 initscripts-9c4fe21ea4dea21bbb30081b288e282ef2dce5dc.tar.xz initscripts-9c4fe21ea4dea21bbb30081b288e282ef2dce5dc.zip |
added mktemp support
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 359ef3cb..16f74129 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -96,20 +96,21 @@ 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" - bootpc --returniffail --timeoutwait 6 --dev ${DEVICE} 2>/dev/null > /tmp/bootpc-response-${DEVICE} + TMPFILE=`/bin/mktemp /tmp/bootp-${DEVICE}.XXXXXX` + bootpc --returniffail --timeoutwait 6 --dev ${DEVICE} 2>/dev/null > ${TMPFILE} if [ "$?" = "0" ]; then - . /tmp/bootpc-response-${DEVICE} + . ${TMPFILE} BOOTPHOSTNAME="$HOSTNAME" echo "bootp response received -- using IP ${IPADDR}" elif [ -z "$IPADDR" ]; then echo "No bootp response recieved -- not configuring device ${DEVICE}." - rm -f /tmp/bootpc-response-${DEVICE} + rm -f ${TMPFILE} exit 1 else echo "No bootp response recieved -- using default configuration for device ${DEVICE}." fi - rm -f /tmp/bootpc-response-${DEVICE} + rm -f ${TMPFILE} elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then echo -n "Using DHCP for ${DEVICE}... " /sbin/dhcpcd -c /etc/sysconfig/network-scripts/ifdhcpc-done ${DEVICE} |