aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2002-02-07 03:56:58 +0000
committerBill Nottingham <notting@redhat.com>2002-02-07 03:56:58 +0000
commitb9c251beba5b0c7afe64f89caaecaab36b40d573 (patch)
tree7578e9b9685f134c8bdfe97fed8b22a563028dda /sysconfig/network-scripts
parent25608554d47c46121935732ab7bbfaeba30457cf (diff)
downloadinitscripts-b9c251beba5b0c7afe64f89caaecaab36b40d573.tar
initscripts-b9c251beba5b0c7afe64f89caaecaab36b40d573.tar.gz
initscripts-b9c251beba5b0c7afe64f89caaecaab36b40d573.tar.bz2
initscripts-b9c251beba5b0c7afe64f89caaecaab36b40d573.tar.xz
initscripts-b9c251beba5b0c7afe64f89caaecaab36b40d573.zip
fix invocation of need_hostname (#58946)
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifup-post13
1 files changed, 7 insertions, 6 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index 370ad7e1..64d5d3f0 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -99,15 +99,16 @@ fi
# don't set hostname on ppp/slip connections
if [ "$2" = "boot" -a \
- need_hostname -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}`
- if [ "$?" = "0" ]; then
- set_hostname $HOSTNAME
+ if need_hostname; then
+ IPADDR=`LANG= LC_ALL= ifconfig ${DEVICE} | grep 'inet addr' |
+ awk -F: '{ print $2 } ' | awk '{ print $1 }'`
+ eval `/bin/ipcalc --silent --hostname ${IPADDR}`
+ if [ "$?" = "0" ]; then
+ set_hostname $HOSTNAME
+ fi
fi
fi