--- elwix/Attic/install2dev.sh 2011/07/21 14:06:05 1.1.2.1 +++ elwix/Attic/install2dev.sh 2011/10/18 09:02:05 1.2 @@ -5,7 +5,7 @@ # (C) AITNET ltd - Sofia/Bulgaria # by Michael Pounov # -# $Id: install2dev.sh,v 1.1.2.1 2011/07/21 14:06:05 misho Exp $ +# $Id: install2dev.sh,v 1.2 2011/10/18 09:02:05 misho Exp $ # [ -r ./config/rc.elwix ] && . ./config/rc.elwix @@ -18,7 +18,7 @@ fi if [ "${USER}" != "root" ]; then echo - echo "ELWIX project is not configured - FS must build under root !?!" + echo "ELWIX project is not configured - install must build under root !?!" echo exit 1 fi @@ -78,7 +78,7 @@ enablejfs() boot2dev() { echo -n "+++ Installboot to device $1 ... " - if disklabel -B $1; then + if disklabel -B -b ${WORLD}/boot/boot -m ${TARGET} ${1}; then echo "OK" else echo "Failed!" @@ -107,13 +107,6 @@ if [ -z $1 ]; then echo " If you wish, may apply secondary optional file name argument for other firmware" echo exit 2 -fi - -if [ ! -r $2 ]; then - echo - echo "Error:: '$2' ELWIX OS file not found!" - echo - exit 2 else DEV=$(echo $1 | awk '{ if (!($1 ~ /^\//)) @@ -125,6 +118,13 @@ else echo "Wrong device $DEV !!!" exit 1 fi +fi + +if [ ! -r ${2:-"${REL}/${OS}"} ]; then + echo + echo "Error:: '$2' ELWIX OS readable file not found!" + echo + exit 2 fi initdev $DEV