aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-12-26 05:58:24 +0000
committerBill Nottingham <notting@redhat.com>2000-12-26 05:58:24 +0000
commit6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0 (patch)
treed4a782a9641e40a795b0a0a7e5dc550f73179ceb /sysconfig
parent3cd1d2c7906684258d3056e782ded69ec3cd14e8 (diff)
downloadinitscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.tar
initscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.tar.gz
initscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.tar.bz2
initscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.tar.xz
initscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.zip
fix scoping isuse (#22547)
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-post5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index ed108fe3..d99b2111 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -25,7 +25,10 @@ fi
if [ "$2" = "boot" -a -n "$NEEDHOSTNAME" -a "${DEVICE}" != lo -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then
IPADDR=`LANG= LC_ALL= ifconfig ${DEVICE} | grep 'inet addr' |
awk -F: '{ print $2 } ' | awk '{ print $1 }'`
- eval `/bin/ipcalc --silent --hostname ${IPADDR}` && set_hostname $HOSTNAME
+ eval `/bin/ipcalc --silent --hostname ${IPADDR}`
+ if [ "$?" = "0" ]; then
+ set_hostname $HOSTNAME
+ fi
fi
if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then