diff options
author | Preston Brown <pbrown@redhat.com> | 2001-09-25 18:48:06 +0000 |
---|---|---|
committer | Preston Brown <pbrown@redhat.com> | 2001-09-25 18:48:06 +0000 |
commit | 8bcc6dbeb644ff182706ec341bda4771e7166672 (patch) | |
tree | f586ed3c6f25e303bf473f3424a1afb65b6b3edc /sysconfig/network-scripts/ifup-post | |
parent | 779670cae04691237a793e7a19f19fd3c2b797d3 (diff) | |
download | initscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.tar initscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.tar.gz initscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.tar.bz2 initscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.tar.xz initscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.zip |
need_hostname now returns true or false, doesn't set NEEDHOSTNAME. Some reformatting fixes.
Diffstat (limited to 'sysconfig/network-scripts/ifup-post')
-rwxr-xr-x | sysconfig/network-scripts/ifup-post | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post index 10a6fa16..740c466b 100755 --- a/sysconfig/network-scripts/ifup-post +++ b/sysconfig/network-scripts/ifup-post @@ -3,7 +3,6 @@ cd /etc/sysconfig/network-scripts . network-functions -need_hostname CONFIG=$1 source_config @@ -99,7 +98,11 @@ if [ "$FIREWALL_MODS" != "no" -a -n "$FWACTIVE" ]; then fi # don't set hostname on ppp/slip connections -if [ "$2" = "boot" -a -n "$NEEDHOSTNAME" -a "${DEVICE}" != lo -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then +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}` |