summaryrefslogtreecommitdiffstats
path: root/iso2usb.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-08-15 23:00:45 +0200
committer Eric Hameleers <alien@slackware.com>2016-08-15 23:00:45 +0200
commitd7583280bc78679b9faa29a7525cd91ea24d1399 (patch)
tree5f3b2e091419711c89d54980f1d574b5fa6c4d3b /iso2usb.sh
parent427c8d323fa26b6991d22f6bf96876de0bf57324 (diff)
downloadliveslak-d7583280bc78679b9faa29a7525cd91ea24d1399.tar.gz
liveslak-d7583280bc78679b9faa29a7525cd91ea24d1399.tar.xz
iso2usb.sh: unsquashfs is not always needed.
Diffstat (limited to '')
-rw-r--r--iso2usb.sh12
1 files changed, 9 insertions, 3 deletions
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