diff options
Diffstat (limited to 'sysconfig/network-scripts/ifup')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 6 |
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 |