diff options
author | Bill Nottingham <notting@redhat.com> | 2000-12-26 05:58:24 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2000-12-26 05:58:24 +0000 |
commit | 6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0 (patch) | |
tree | d4a782a9641e40a795b0a0a7e5dc550f73179ceb | |
parent | 3cd1d2c7906684258d3056e782ded69ec3cd14e8 (diff) | |
download | initscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.tar initscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.tar.gz initscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.tar.bz2 initscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.tar.xz initscripts-6df9ee90d18aaa765ee36dfcede2d4fb27f52ce0.zip |
fix scoping isuse (#22547)
-rwxr-xr-x | sysconfig/network-scripts/ifup-post | 5 |
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 |