aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-04-16 22:40:06 +0000
committerBill Nottingham <notting@redhat.com>2007-04-16 22:40:06 +0000
commite59e4e0c6ddf57797aad47c696544ee6bbaef187 (patch)
tree1e012db4669d995bfedfda0608f2f896f2233c32 /sysconfig
parentea8d97872e4b238f57fb1d02a203b6c356ff5102 (diff)
downloadinitscripts-e59e4e0c6ddf57797aad47c696544ee6bbaef187.tar
initscripts-e59e4e0c6ddf57797aad47c696544ee6bbaef187.tar.gz
initscripts-e59e4e0c6ddf57797aad47c696544ee6bbaef187.tar.bz2
initscripts-e59e4e0c6ddf57797aad47c696544ee6bbaef187.tar.xz
initscripts-e59e4e0c6ddf57797aad47c696544ee6bbaef187.zip
only use the first address (#230157, <michal@harddata.com>)
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-post4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index 28880806..af54ed94 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -23,7 +23,7 @@ fi
/etc/sysconfig/network-scripts/ifup-routes ${REALDEVICE} ${DEVNAME}
-if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then
+if [ "$PEERDNS" != "no" ] ||[ -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then
[ -n "$MS_DNS1" ] && DNS1=$MS_DNS1
[ -n "$MS_DNS2" ] && DNS2=$MS_DNS2
if [ -n "$DNS1" ] && ! grep -q "^nameserver $DNS1" /etc/resolv.conf &&
@@ -85,7 +85,7 @@ if [ "$2" = "boot" -a \
"${DEVICETYPE}" != "ppp" -a \
"${DEVICETYPE}" != "slip" ]; then
if need_hostname; then
- IPADDR=$(LANG=C ip -o -4 addr ls dev ${DEVICE} | awk '{ print $4 }')
+ IPADDR=$(LANG=C ip -o -4 addr ls dev ${DEVICE} | awk '{ print $4 ; exit }')
eval $(/bin/ipcalc --silent --hostname ${IPADDR} ; echo "status=$?")
if [ "$status" = "0" ]; then
set_hostname $HOSTNAME