--- elwix/Attic/install2dev.sh	2011/07/21 14:06:05	1.1.2.1
+++ elwix/Attic/install2dev.sh	2013/08/05 13:09:20	1.2.10.1
@@ -5,7 +5,7 @@
 # (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
 #    by Michael Pounov <misho@elwix.org>
 #
-# $Id: install2dev.sh,v 1.1.2.1 2011/07/21 14:06:05 misho Exp $
+# $Id: install2dev.sh,v 1.2.10.1 2013/08/05 13:09:20 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 ~ /^\//))
@@ -126,6 +119,14 @@ else
 		exit 1
 	fi
 fi
+
+if [ -z "$2" -o ! -r "$2" ]; then
+	echo
+	echo "Error:: ELWIX OS tar file '$2' not found!"
+	echo
+	exit 2
+fi
+
 
 initdev $DEV