30a31 > sleep 2 95a97,99 > if [[ "$DEV" =~ "/dev/loop*" ]]; then > return 0 > fi 156c160 < USBLABEL="UUID=$(/lib/udev/vol_id -u $USBDEV)" --- > USBLABEL="UUID=$(/sbin/blkid -s UUID -o value $USBDEV)" 178c182 < USBLABEL="UUID=$(/lib/udev/vol_id -u $USBDEV)" --- > USBLABEL="UUID=$(/sbin/blkid -s UUID -o value $USBDEV)" 212c216 < USBFS=$(/lib/udev/vol_id -t $dev) --- > USBFS=$(/sbin/blkid -s TYPE -o value $dev) 218c222 < USBLABEL=$(/lib/udev/vol_id -u $dev) --- > USBLABEL=$(/sbin/blkid -s UUID -o value $dev) 222c226 < USBLABEL=$(/lib/udev/vol_id -l $dev) --- > USBLABEL=$(/sbin/blkid -s LABEL -o value $dev) 277a282,294 > detectisotype() { > if [ -e $CDMNT/LiveOS/squashfs.img ]; then > isotype=live > return > fi > if [ -e $CDMNT/images/install.img ]; then > isotype=installer > return > fi > echo "ERROR: $ISO does not appear to be a Live image or DVD installer." > exitclean > } > 282a300 > isotype= 438a457,458 > detectisotype > 479c499,501 < if [ $(($overlaysizemb + $homesizemb + $livesize + $swapsizemb)) -gt $(($free + $tbd)) ]; then --- > if [ "$isotype" = "live" ]; then > tba=$(($overlaysizemb + $homesizemb + $livesize + $swapsizemb)) > if [ $tba -gt $(($free + $tbd)) ]; then 481,485c503,511 < echo "Size of live image: $livesize" < [ "$overlaysizemb" -gt 0 ] && echo "Overlay size: $overlaysizemb" < [ "$homesizemb" -gt 0 ] && echo "Home overlay size: $homesizemb" < [ "$swapsizemb" -gt 0 ] && echo "Home overlay size: $swapsizemb" < echo "Available space: $(($free + $tbd))" --- > echo "+ Size of live image: $livesize" > [ "$overlaysizemb" -gt 0 ] && echo "+ Overlay size: $overlaysizemb" > [ "$homesizemb" -gt 0 ] && echo "+ Home overlay size: $homesizemb" > [ "$swapsizemb" -gt 0 ] && echo "+ Swap overlay size: $swapsizemb" > echo "---------------------------" > echo "= Requested: $tba" > echo "- Available: $(($free + $tbd))" > echo "---------------------------" > echo "= To fit, free or decrease requested size total by: $(($tba - $free - $tbd))" 487a514 > fi 489c516,536 < if [ -z "$skipcopy" ];then --- > # Verify available space for DVD installer > if [ "$isotype" = "installer" ]; then > isosize=$(du -s -B 1M $ISO | awk {'print $1;'}) > installimgsize=$(du -s -B 1M $CDMNT/images/install.img | awk {'print $1;'}) > tbd=0 > if [ -e $USBMNT/images/install.img ]; then > tbd=$(du -s -B 1M $USBMNT/images/install.img | awk {'print $1;'}) > fi > if [ -e $USBMNT/$(basename $ISO) ]; then > tbd=$(($tbd + $(du -s -B 1M $USBMNT/$(basename $ISO) | awk {'print $1;'}))) > fi > echo "Size of DVD image: $isosize" > echo "Size of install.img: $installimgsize" > echo "Available space: $(($free + $tbd))" > if [ $(($isosize + $installimgsize)) -gt $(($free + $tbd)) ]; then > echo "ERROR: Unable to fit DVD image + install.img on available space on USB stick" > exitclean > fi > fi > > if [ -z "$skipcopy" ] && [ "$isotype" = "live" ]; then 511c558,559 < if [ -z "$skipcopy" ];then --- > # Live image copy > if [ -z "$skipcopy" ] && [ "$isotype" = "live" ]; then 528a577,584 > # DVD installer copy > if [ "$isotype" = "installer" ] && [ -z "$skipcopy" ]; then > echo "Copying DVD image to USB stick" > mkdir -p $USBMNT/images/ > cp $CDMNT/images/install.img $USBMNT/images/install.img || exitclean > cp $ISO $USBMNT/ > fi > 546a603,608 > # DVD Installer > if [ "$isotype" = "installer" ]; then > sed -i -e "s;initrd=initrd.img;initrd=initrd.img repo=hd:$USBLABEL:/;g" $BOOTCONFIG $BOOTCONFIG_EFI > sed -i -e "s;stage2=\S*;;g" $BOOTCONFIG $BOOTCONFIG_EFI > fi > 549c611 < OVERFILE="overlay-$( /lib/udev/vol_id -l $USBDEV )-$( /lib/udev/vol_id -u $USBDEV )" --- > OVERFILE="overlay-$( /sbin/blkid -s LABEL -o value $USBDEV )-$( /sbin/blkid -s UUID -o value $USBDEV )" 592a655 > sleep 2 694,695c757,758 < sed -i -e "s;kernel vm;kernel $LIVEOS/syslinux/vm;" $USBMNT/$SYSLINUXPATH/isolinux.cfg < sed -i -e "s;initrd i;initrd $LIVEOS/syslinux/i;" $USBMNT/$SYSLINUXPATH/isolinux.cfg --- > sed -i -e "s;kernel vm;kernel /$LIVEOS/syslinux/vm;" $USBMNT/$SYSLINUXPATH/isolinux.cfg > sed -i -e "s;initrd=i;initrd=/$LIVEOS/syslinux/i;" $USBMNT/$SYSLINUXPATH/isolinux.cfg