diff options
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifup-post | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post index 789afd12..fb858a60 100755 --- a/sysconfig/network-scripts/ifup-post +++ b/sysconfig/network-scripts/ifup-post @@ -21,7 +21,9 @@ if [ "$ISALIAS" = no ] ; then /etc/sysconfig/network-scripts/ifup-aliases ${DEVICE} fi -if [ -n "$NEEDHOSTNAME" -a ${DEVICE} != lo ]; then + +# don't set hostname on ppp/slip connections +if [ -n "$NEEDHOSTNAME" -a "${DEVICE}" != lo -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then IPADDR=`ifconfig ${DEVICE} | grep 'inet addr' | awk -F: '{ print $2 } ' | awk '{ print $1 }'` eval `/bin/ipcalc --silent --hostname ${IPADDR}` && set_hostname $HOSTNAME |