rootfsinstall: support for multiple additional archives (-a) and for qemu static file as used in other distributions
This commit is contained in:
parent
c62ab88a37
commit
3aba21d977
@ -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 || {
|
||||
|
Loading…
Reference in New Issue
Block a user