X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Finstall-bootscripts;h=c3a2edd75ad608660aa019ba4e064a4e1bf32e86;hb=46a6cd65aaf72c044223fa7c33a28d6e99fa1f20;hp=894c3440a1d1021002e7e345107ae829e0010470;hpb=2ad910e22979500192ea43d5599ad003440744a4;p=hvlinux.git diff --git a/stage2/install-bootscripts b/stage2/install-bootscripts index 894c344..c3a2edd 100755 --- a/stage2/install-bootscripts +++ b/stage2/install-bootscripts @@ -1,9 +1,6 @@ #!/bin/bash -# Reading system configuration informations, functions and package versions. -source ../config/sysinfos -source ../functions -source ../config/packages-list +source ../functions/main DHCP_USED="no" @@ -20,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 @@ -59,6 +62,9 @@ cat >> /etc/sysconfig/network/network-parameters << EOF # Set to "yes" to enable the NFS server: NFS_SERVER_ENA="no" +# Set to "yes" to enable the SSH server: +SSH_SERVER_ENA="no" + # Set FIREWALL_ENA to "yes" to enable the firewall: FIREWALL_ENA="no" # Set FIREWALL_WWW to the ethernet interface connected to the outside world (internet): @@ -82,9 +88,9 @@ fi sed -i -e "s!^\(export PATH=\).*tools.*!\1/bin:/usr/bin:/sbin:/usr/sbin!" /etc/rc.d/init.d/functions # Copying boot scripts -STAGE2_BOOTSCRIPTS="ifdown ifup keyboard mountnetfs network sysklogd" +STAGE2_BOOTSCRIPTS="ifdown ifup keyboard mountnetfs network syslogd klogd" for bootscript in ${STAGE2_BOOTSCRIPTS}; do - install -m755 bootscripts/${bootscript} /etc/rc.d/init.d + install -v -m755 bootscripts/${bootscript} /etc/rc.d/init.d done # Necessary because bootscript_add_* scripts use ${LFS} when @@ -92,7 +98,8 @@ done export LFS= # rcsysinit.d -bootscript_add_rcsysinit sysklogd 50 93 +bootscript_add_rcsysinit syslogd 50 93 +bootscript_add_rcsysinit klogd 51 92 bootscript_add_rcsysinit keyboard 55 00 # rc3.d