--- elwix/config/etc/rootfs/rc 2012/10/10 08:58:49 1.1.1.1.6.9 +++ elwix/config/etc/rootfs/rc 2012/10/10 09:14:25 1.1.1.1.6.10 @@ -2,7 +2,7 @@ # # Boot startup script for ELWIX RootFS ... # -# $Id: rc,v 1.1.1.1.6.9 2012/10/10 08:58:49 misho Exp $ +# $Id: rc,v 1.1.1.1.6.10 2012/10/10 09:14:25 misho Exp $ stty status '^T' @@ -30,7 +30,7 @@ umask 022 failed_sysvol() { - echo " RootFS: Failed $1 ELWIX $2 ... Go to emergency shell !!!" + echo " RootFS: Failed $1 - $2 ... Go to emergency shell !!!" exit 127 } @@ -38,23 +38,18 @@ failed_sysvol() boot_elwix() { echo " RootFS: Loading ELWIX system firmware" - if test ! -r $FRMPATH/$FRMFILE; then - echo " RootFS: WARNING! Failed default firmware image!" - echo " RootFS: Try to load ELWIX backup firmware ..." - FRMPATH="$FRMPATH/altroot" - if test ! -r $FRMPATH/$FRMFILE; then - failed_sysvol "load backup and default image" elwix-firmware.sys - fi - fi - mdmfs -s $FRMSIZE -S -m0 -oasync $FRMDEV /usr + if [ "$?" != "0" ]; then + failed_sysvol "to mount firmware image " elwix-firmware.sys + fi cd /usr pax -r -z -pe -f $FRMPATH/$FRMFILE + if [ "$?" != "0" ]; then + failed_sysvol "to load firmware image " elwix-firmware.sys + fi cd - mount -ur /usr - - sleep 2 } mount_usr() @@ -62,6 +57,9 @@ mount_usr() echo " RootFS: Mounting ELWIX system image" mount -t nullfs -r $FRMPATH/usr /usr + if [ "$?" != "0" ]; then + failed_sysvol "to mount system image " elwix-firmware.sys + fi } # @@ -80,7 +78,7 @@ if test -c $FIT2CF -a -d $CFDIR; then failed_sysvol mount "flash volume" fi -if [ -r /elwix/elwix-firmware.sys ]; then +if [ -r $FRMPATH/$FRMFILE ]; then boot_elwix else if [ -d $FRMPATH/usr ]; then