X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Finstall-bootscripts;h=d6acdd02e1a302dd08ddc3f17e9d962133fb2d2c;hb=38a036800434ff4f8381cfb921b2f216937a43e9;hp=f0a45a34bec55206e87bc1d40dc1f7a6d5d99583;hpb=f3c8db3027d5dc530e1f30c88e0235975211582e;p=hvlinux.git diff --git a/stage2/install-bootscripts b/stage2/install-bootscripts index f0a45a3..d6acdd0 100755 --- a/stage2/install-bootscripts +++ b/stage2/install-bootscripts @@ -17,15 +17,21 @@ for nic_device in ${INTERFACES}; do file="/etc/sysconfig/network/ifconfig.${nic_device}" echo "ONBOOT=\"yes\"" > ${file} echo "BOOTPROTO=\"${BOOTPROTO[${LOOP_INDEX}]}\"" >> ${file} - echo "IPADDR=\"${IP_ADDRESS[${LOOP_INDEX}]}\"" >> ${file} - echo "PREFIX_LENGTH=\"${PREFIX_LENGTH[${LOOP_INDEX}]}\"" >> ${file} - echo "IFSCOPE=\"\"" >> ${file} - echo "GATEWAY=\"${GATEWAY[${LOOP_INDEX}]}\"" >> ${file} - - if [ "x${BOOTPROTO[${LOOP_INDEX}]}" = "xdhcp" ]; then + if [ "x${BOOTPROTO[${LOOP_INDEX}]}" = "xdhcp" -o \ + "x${BOOTPROTO[${LOOP_INDEX}]}" = "xwifi" ]; then DHCP_USED="yes" fi + 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} + fi + if [ -n "${GATEWAY[${LOOP_INDEX}]}" ]; then + echo "GATEWAY=\"${GATEWAY[${LOOP_INDEX}]}\"" >> ${file} + fi + LOOP_INDEX=$((${LOOP_INDEX} + 1)) done