diff --git a/src/rootfsinstall.sh b/src/rootfsinstall.sh index f522f6e..1cd31c5 100755 --- a/src/rootfsinstall.sh +++ b/src/rootfsinstall.sh @@ -63,6 +63,7 @@ while [ "$1" ]; do exit 1 } ADDITIONALARCHIVE=`realpath $2` + ADDITIONALARCHIVES[${#ADDITIONALARCHIVES[*]}]="${ADDITIONALARCHIVE}" [ -r "$ADDITIONALARCHIVE" ] || { echo "Error: file $ADDITIONALARCHIVE not found; aborting." exit 1 @@ -329,7 +330,7 @@ fi mount -o bind /$b $ROOTMP/$b done - if [ "$ADDITIONALARCHIVE" ]; then + for ADDITIONALARCHIVE in ${ADDITIONALARCHIVES[*]}; do echo "Uncompressing $ADDITIONALARCHIVE..." echo -n "This can take a while, please wait..." tar xf $ADDITIONALARCHIVE || { @@ -338,12 +339,17 @@ fi exit 1 } echo "DONE" - fi + done ) [ $? -eq 0 ] || exit $? -[ -e /usr/bin/qemu-${TARGET_ARCH}.static ] && cp /usr/bin/qemu-${TARGET_ARCH}.static $ROOTMP/usr/bin/qemu-${TARGET_ARCH} +for f in qemu-${TARGET_ARCH}.static qemu-${TARGET_ARCH}-static; do + if [ -e /usr/bin/${f} ]; then + cp /usr/bin/${f} $ROOTMP/usr/bin/qemu-${TARGET_ARCH} + break + fi +done if [ "$ROOTPASSWORD" ]; then echo "$ROOTPASSWORD" | chroot $ROOTMP passwd root --stdin || {