From 0ae7492eeb91d5e08480204786bd882344ef15a3 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Fri, 5 Feb 2016 00:44:10 +0100 Subject: iso2usb.sh: fix a logic error. --- iso2usb.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'iso2usb.sh') diff --git a/iso2usb.sh b/iso2usb.sh index 87e32e7..721ddd7 100644 --- a/iso2usb.sh +++ b/iso2usb.sh @@ -45,8 +45,11 @@ WAIT=5 # No LUKS encryption by default: DOLUKS=0 + +# Initialize more variables: CNTDEV="" CNTFILE="" +LUKSHOME="" LODEV="" # Define ahead of time, so that cleanup knows about them: @@ -146,10 +149,10 @@ update_initrd() { echo "--- Updating 'waitforroot' time from '$OLDWAIT' to '$WAIT':" echo ${WAIT} > wait-for-root - if [ $DOLUKS -eq 1 ]; then - if ! grep -q ${CNTFILE} luksdev ; then - echo "--- Adding '${CNTFILE}' as LUKS /home:" - echo "${CNTFILE}" >> luksdev + if [ $DOLUKS -eq 1 -a -n "${LUKSHOME}" ]; then + if ! grep -q ${LUKSHOME} luksdev ; then + echo "--- Adding '${LUKSHOME}' as LUKS /home:" + echo "${LUKSHOME}" >> luksdev fi fi @@ -492,6 +495,7 @@ fi if [ $DOLUKS -eq 1 ]; then # Create LUKS container file: create_container ${TARGET}3 ${LUKSSIZE} slhome luks /home + LUKSHOME=${CNTFILE} fi # Add more USB WAIT seconds to the initrd: -- cgit v1.2.3