Add ifconfig template
[hvlinux.git] / stage2 / install-bootscripts
index 54d58e7..4df1e2f 100755 (executable)
@@ -35,6 +35,27 @@ for nic_device in ${INTERFACES}; do
     LOOP_INDEX=$((${LOOP_INDEX} + 1))
 done
 
+# Create template
+cat > /etc/sysconfig/network/ifconfig.template << EOF
+# yes or no
+ONBOOT="yes"
+
+# static, dhcp or wifi
+# When using static, you can still configure your DHCP server to reserve a
+# static address (IPADDR).
+# When using static address, don't forget to manually edit /etc/resolv.conf.
+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.
+GATEWAY="192.168.1.1"
+EOF
+
 # "/etc/resolv.conf" file
 if [ "x${DHCP_USED}" = "xno" ]; then
     if [ -f /etc/resolv.conf ]; then
@@ -49,12 +70,20 @@ fi
 
 # "/etc/sysconfig/network/network-parameters" file creation
 echo "#!/bin/sh" > /etc/sysconfig/network/network-parameters
+echo "" >> /etc/sysconfig/network/network-parameters
+echo "# Run network script in the background, to speed-up boot time." >> \
+    /etc/sysconfig/network/network-parameters
+echo "BACKGROUND_START=no" >> /etc/sysconfig/network/network-parameters
+echo "" >> /etc/sysconfig/network/network-parameters
 echo "DOMAINNAME=\"${DOMAIN}\"" >> /etc/sysconfig/network/network-parameters
-echo "INTERFACES_UP=\"lo ${INTERFACES}\"" >> /etc/sysconfig/network/network-parameters
-echo "INTERFACES_DN=\"${INTERFACES} lo\"" >> /etc/sysconfig/network/network-parameters
+echo "INTERFACES=\"lo ${INTERFACES}\"" >> /etc/sysconfig/network/network-parameters
 
 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"