aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1998-03-10 15:51:16 +0000
committerErik Troan <ewt@redhat.com>1998-03-10 15:51:16 +0000
commit54a18ea25de3965e7ae907c3238569eb01803bf1 (patch)
treef7406baec5ce06d0a15382b0504c860256721fc7 /sysconfig/network-scripts/ifup
parentfb0f2343a9f5f284e7b75adf60fa33f50181b3fb (diff)
downloadinitscripts-54a18ea25de3965e7ae907c3238569eb01803bf1.tar
initscripts-54a18ea25de3965e7ae907c3238569eb01803bf1.tar.gz
initscripts-54a18ea25de3965e7ae907c3238569eb01803bf1.tar.bz2
initscripts-54a18ea25de3965e7ae907c3238569eb01803bf1.tar.xz
initscripts-54a18ea25de3965e7ae907c3238569eb01803bf1.zip
1) added need_hostname and set_hostname functions
2) changed hostname lookup to use ipcalc
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-xsysconfig/network-scripts/ifup6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 672f803c..5ea30db9 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -5,6 +5,8 @@ cd /etc/sysconfig/network-scripts
. network-functions
+need_hostname
+
CONFIG=$1
[ -z "$CONFIG" ] && {
@@ -160,8 +162,8 @@ if [ "$IPSETUP" != yes ]; then
done
fi
- if [ -n "$BOOTPHOSTNAME" -a "`hostname`" = "(none)" ]; then
- hostname $BOOTPHOSTNAME
+ if [ -n "$BOOTPHOSTNAME" -a -n "$NEEDHOSTNAME" ]; then
+ set_hostname $BOOTPHOSTNAME
fi
fi
fi