# 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)
# 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
ONBOOT="yes"
BOOTPROTO="static"
IPADDR="127.0.0.1"
-PREFIX_LENGTH=8
+NETMASK_LENGTH=8
IFSCOPE="scope host"
EOF
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}
# 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"