aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsysconfig/network-scripts/ifup8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 3f791533..672f803c 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -113,6 +113,14 @@ elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
fi
if [ "$IPSETUP" != yes ]; then
+ if [ -z "$BROADCAST" ]; then
+ eval `/sbin/ipcalc --broadcast ${IPADDR} ${NETMASK}`
+ fi
+
+ if [ -z "$NETMASK" ]; then
+ eval `/sbin/ipcalc --netmask ${IPADDR} ${NETMASK}`
+ fi
+
ifconfig ${DEVICE} ${MACADDR:+hw ether $MACADDR} ${IPADDR} \
netmask ${NETMASK} broadcast ${BROADCAST}
if [ "$ISALIAS" = no ] ; then