X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Finstall-bootscripts;h=44e0134167400b970ee6e3166c334da2e4510570;hb=ca489ced1fbb7de4d815bb4e194f8b83bfc5c959;hp=75b40117827e69929c75f7a0eb388d8ccba3ee12;hpb=7f1a3e5d69d0b1d64619604c30243e0070dc09ad;p=hvlinux.git diff --git a/stage2/install-bootscripts b/stage2/install-bootscripts index 75b4011..44e0134 100755 --- a/stage2/install-bootscripts +++ b/stage2/install-bootscripts @@ -1,9 +1,6 @@ #!/bin/bash -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../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 @@ -52,6 +55,10 @@ echo "INTERFACES_DN=\"${INTERFACES} lo\"" >> /etc/sysconfig/network/network-para cat >> /etc/sysconfig/network/network-parameters << EOF +# Signal to other scripts that all network interfaces have been started +# (especially usefull to prevent mountnetfs bootscript to block forever) +NETWORKING_UP_FILE=/var/run/networking-up + # On which network interface(s) to activate the DHCP server. # Leave empty or comment the line to disable the DHCP server. #DHCP_SERVER_IF="eth0" @@ -59,6 +66,12 @@ 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 to "yes" to enable the DNS server: +DNS_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 +95,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 +105,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