From 2f3dff27a27e5fc095399b9ce96ac84f4bd92447 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 4 Feb 2015 22:35:29 -0500 Subject: [PATCH] Replace PREFIX_LENGTH with NETMASK_LENGHTH --- config/sysinfos.default | 2 +- stage2/bootscripts/ifup | 4 ++-- stage2/install-bootscripts | 10 +++++----- stage2/pkg/wireless-tools | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/sysinfos.default b/config/sysinfos.default index abf9ee3..85c44b5 100644 --- a/config/sysinfos.default +++ b/config/sysinfos.default @@ -75,7 +75,7 @@ XORG_KEYBOARD_VARIANT="intl" # Network interface card #2 settings #BOOTPROTO[1]="static" #IP_ADDRESS[1]="192.168.0.1" -#PREFIX_LENGTH[1]=24 +#NETMASK_LENGTH[1]=24 #GATEWAY[1]="192.168.0.1" # DNS servers addresses (not required if using DHCP) diff --git a/stage2/bootscripts/ifup b/stage2/bootscripts/ifup index 13bb3e5..5ba66bb 100755 --- a/stage2/bootscripts/ifup +++ b/stage2/bootscripts/ifup @@ -67,8 +67,8 @@ bring_if_up() # Static IP address protocol proto_static() { - cmd_run_log ip addr add ${IPADDR}/${PREFIX_LENGTH} dev ${DEVICE} \ - brd + ${IFSCOPE} || exit ${EXIT_CODE_FAILURE} + cmd_run_log ip addr add ${IPADDR}/${NETMASK_LENGTH} dev ${DEVICE} \ + brd + ${IFSCOPE} || exit ${EXIT_CODE_FAILURE} # Bring interface up bring_if_up diff --git a/stage2/install-bootscripts b/stage2/install-bootscripts index 4df1e2f..07c2d18 100755 --- a/stage2/install-bootscripts +++ b/stage2/install-bootscripts @@ -8,7 +8,7 @@ cat > /etc/sysconfig/network/ifconfig.lo << "EOF" ONBOOT="yes" BOOTPROTO="static" IPADDR="127.0.0.1" -PREFIX_LENGTH=8 +NETMASK_LENGTH=8 IFSCOPE="scope host" EOF @@ -25,8 +25,8 @@ for nic_device in ${INTERFACES}; do if [ -n "${IP_ADDRESS[${LOOP_INDEX}]}" ]; then echo "IPADDR=\"${IP_ADDRESS[${LOOP_INDEX}]}\"" >> ${file} fi - if [ -n "${PREFIX_LENGTH[${LOOP_INDEX}]}" ]; then - echo "PREFIX_LENGTH=\"${PREFIX_LENGTH[${LOOP_INDEX}]}\"" >> ${file} + if [ -n "${NETMASK_LENGTH[${LOOP_INDEX}]}" ]; then + echo "NETMASK_LENGTH=\"${NETMASK_LENGTH[${LOOP_INDEX}]}\"" >> ${file} fi if [ -n "${GATEWAY[${LOOP_INDEX}]}" ]; then echo "GATEWAY=\"${GATEWAY[${LOOP_INDEX}]}\"" >> ${file} @@ -49,8 +49,8 @@ BOOTPROTO="static" # Only needed if BOOTPROTO=static IPADDR="192.168.1.2" -# Only needed if BOOTPROTO=static, normally 8 for LAN -PREFIX_LENGTH="8" +# Only needed if BOOTPROTO=static, normally 24 for 192.168.x.x LAN +NETMASK_LENGTH="24" # Only needed if BOOTPROTO=static. GATEWAY="192.168.1.1" diff --git a/stage2/pkg/wireless-tools b/stage2/pkg/wireless-tools index 9747dbe..2da0fe6 100644 --- a/stage2/pkg/wireless-tools +++ b/stage2/pkg/wireless-tools @@ -18,7 +18,7 @@ BOOTPROTO="static" # The following variables are used only for "static": IPADDR="192.168.1.6" -PREFIX_LENGTH="24" +NETMASK_LENGTH="24" GATEWAY="192.168.1.1" EOF } -- 2.20.1