diff options
author | Eric Hameleers <alien@slackware.com> | 2016-02-05 00:44:10 +0100 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2016-02-05 00:44:10 +0100 |
commit | 0ae7492eeb91d5e08480204786bd882344ef15a3 (patch) | |
tree | 063f6c43fe5d706170f21fd6cdfcf610cdb26478 | |
parent | 71666606767370c5effcdbd83064bd288676ea3f (diff) | |
download | liveslak-0ae7492eeb91d5e08480204786bd882344ef15a3.tar.gz liveslak-0ae7492eeb91d5e08480204786bd882344ef15a3.tar.xz |
iso2usb.sh: fix a logic error.
-rw-r--r-- | iso2usb.sh | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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: |