diskimg: added usbinstall support for usb pendrive for x86/x86_64 disk images support as well

This commit is contained in:
Silvan Calarco 2014-12-08 12:32:29 +01:00
parent d2474d6bb8
commit afbafae681

View File

@ -1,10 +1,12 @@
case $VARIANT in
bananapi) ROOTFSINSTALL_ADD="-bpi"; DEVICEARCH=arm ;;
raspberrypi) ROOTFSINSTALL_ADD="-rpi"; DEVICEARCH=arm ;;
cubox) ROOTFSINSTALL_ADD="-cubox"; DEVICEARCH=arm ;;
*) ROOTFSINSTALL_ADD= ; DEVICEARCH=$ARCH ;;
bananapi) MODE=rootfsinstall; ROOTFSINSTALL_ADD="-bpi"; DEVICEARCH=arm ;;
raspberrypi) MODE=rootfsinstall; ROOTFSINSTALL_ADD="-rpi"; DEVICEARCH=arm ;;
cubox) MODE=rootfsinstall; ROOTFSINSTALL_ADD="-cubox" ;;
livecd) MODE=usbinstall; ROOTFSINSTALL_ADD="-cubox" ;;
*) MODE=rootfsinstall; ROOTFSINSTALL_ADD= ; DEVICEARCH=$ARCH ;;
esac
if [ "$MODE" = "rootfsinstall" ]; then
/usr/sbin/rootfsinstall -y $ROOTFSINSTALL_ADD $LOOPDEV \
$LOCALSTATEDIR/openmamba-rootfs-light-$LANGUAGE.$DEVICEARCH.tar.xz || \
{ retcode=$?
@ -13,4 +15,17 @@ esac
echo "$makedist_me: sleeping 600 seconds"
sleep 600
{ (exit 1); exit 1; }; }
elif [ "$MODE" = "usbinstall" ]; then
# FIXME: current hosting system requirements:
# grub-efi.i586 mactel-boot
/usr/sbin/usbinstall $LOOPDEV $LOCALSTATEDIR/openmamba-livecd-$LANGUAGE.$ARCH.iso -y || \
{ retcode=$?
echo "$makedist_me: fatal error, aborting installation" >&2
echo "$makedist_me: exit code was: $retcode" >&2
echo "$makedist_me: sleeping 600 seconds"
sleep 600
{ (exit 1); exit 1; }; }
else
echo "$makedist_me: MODE is undefined; aborting."
{ (exit 1); exit 1; };
fi