--- elwix/config/etc/default/rc.init 2014/01/05 23:14:23 1.4 +++ elwix/config/etc/default/rc.init 2017/02/13 16:52:47 1.6 @@ -2,7 +2,7 @@ # # Boot startup script for elwix :) # -# $Id: rc.init,v 1.4 2014/01/05 23:14:23 misho Exp $ +# $Id: rc.init,v 1.6 2017/02/13 16:52:47 misho Exp $ stty status '^T' @@ -20,7 +20,6 @@ export HOME PATH TERM BLOCKSIZE EDITOR PAGER SYSPKGDIR="/var/frm" BOOTLOG="/var/run/elwix.boot" -XML="/etc/config.xml" MGMT_VLAN="4093" MGMT_NAME="mgmt" @@ -30,16 +29,20 @@ umask 022 boot() { - echo "Check and mount filesystems ..." - fsck -y 1>/dev/null 2>&1 && mount -a || fsck -f -y - - echo "Loading elwix firmware variables ..." + echo "Loading ELWIX configz ..." cd /elwix/altroot pax -rw -pe var / chmod 1777 /var/tmp + mount -tunionfs -onoatime /var/db /elwix/etc cd / } +restore_uboot() +{ + echo "Restore configz from NAND ..." + /etc/rc.cfg load /etc +} + options() { echo "Set firmware options ..." | tee -a $BOOTLOG @@ -58,10 +61,6 @@ local() echo "Configurate localhost ..." | tee -a $BOOTLOG ifconfig lo0 127.0.0.1 | tee -a $BOOTLOG 1>/dev/null 2>&1 hostname `cat /etc/myname` - if [ -x /usr/bin/xmler ]; then - hostname `xmler -g /elwix/system/hostname $XML` - domainname `xmler -g /elwix/system/domain $XML` - fi } geteth() @@ -168,6 +167,7 @@ service() # boot +restore_uboot echo "elwix>>> Start system boot stage at `date`" | tee $BOOTLOG options passwd