Replace PREFIX_LENGTH with NETMASK_LENGHTH
authorHugo Villeneuve <hugo@hugovil.com>
Thu, 5 Feb 2015 03:35:29 +0000 (22:35 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Sun, 1 Mar 2015 01:39:44 +0000 (20:39 -0500)
config/sysinfos.default
stage2/bootscripts/ifup
stage2/install-bootscripts
stage2/pkg/wireless-tools

index abf9ee3..85c44b5 100644 (file)
@@ -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)
index 13bb3e5..5ba66bb 100755 (executable)
@@ -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
index 4df1e2f..07c2d18 100755 (executable)
@@ -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"
index 9747dbe..2da0fe6 100644 (file)
@@ -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
 }