From d7583280bc78679b9faa29a7525cd91ea24d1399 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 15 Aug 2016 23:00:45 +0200 Subject: iso2usb.sh: unsquashfs is not always needed. --- iso2usb.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'iso2usb.sh') diff --git a/iso2usb.sh b/iso2usb.sh index 5f328f4..ed6fec4 100644 --- a/iso2usb.sh +++ b/iso2usb.sh @@ -58,10 +58,14 @@ DOLUKS=0 # We are NOT refreshing existing Live content by default: REFRESH=0 +# These tools are required by the script, we will check for their existence: +REQTOOLS="blkid cpio extlinux fdisk gdisk isoinfo mkdosfs sgdisk" + # Initialize more variables: CNTBASE="" CNTDEV="" CNTFILE="" +HLUKSSIZE="" LUKSHOME="" LODEV="" @@ -363,6 +367,8 @@ while [ ! -z "$1" ]; do -c|--crypt) HLUKSSIZE="$2" DOLUKS=1 + # Needs unsquashfs to extract the /home + REQTOOLS="${REQTOOLS} unsquashfs" shift 2 ;; -f|--force) @@ -450,7 +456,7 @@ fi # Are all the required not-so-common add-on tools present? PROG_MISSING="" -for PROGN in blkid cpio extlinux fdisk gdisk isoinfo mkdosfs sgdisk unsquashfs ; do +for PROGN in ${REQTOOLS} ; do if ! PATH="/sbin:$PATH" which $PROGN 1>/dev/null 2>/dev/null ; then PROG_MISSING="${PROG_MISSING}-- $PROGN\n" fi @@ -624,8 +630,8 @@ if [ -n "$VERSION" ]; then echo "$VERSION" > ${USBMNT}/.isoversion fi -if [ $DOLUKS -eq 1 ]; then - # Create LUKS container file: +if [ -n "${HLUKSSIZE}" ]; then + # Create LUKS container file for /home: create_container ${TARGET}3 ${HLUKSSIZE} ${SLHOME} luks /home LUKSHOME=${CNTFILE} fi -- cgit v1.2.3