aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-03-18 19:12:23 +0000
committerBill Nottingham <notting@redhat.com>1999-03-18 19:12:23 +0000
commit83323f3cd6ebdef38e5f229ae40aebfeed893786 (patch)
tree30528edfb7cb03ecc5316768c70a93cb345d7309 /sysconfig/network-scripts
parent3a958c41fa4d61c71d6ad9247faa9772328f632d (diff)
downloadinitscripts-83323f3cd6ebdef38e5f229ae40aebfeed893786.tar
initscripts-83323f3cd6ebdef38e5f229ae40aebfeed893786.tar.gz
initscripts-83323f3cd6ebdef38e5f229ae40aebfeed893786.tar.bz2
initscripts-83323f3cd6ebdef38e5f229ae40aebfeed893786.tar.xz
initscripts-83323f3cd6ebdef38e5f229ae40aebfeed893786.zip
don't set hostname on ppp/slip (kills X)
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifup-post4
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