summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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
commit0ae7492eeb91d5e08480204786bd882344ef15a3 (patch)
tree063f6c43fe5d706170f21fd6cdfcf610cdb26478
parent71666606767370c5effcdbd83064bd288676ea3f (diff)
downloadliveslak-0ae7492eeb91d5e08480204786bd882344ef15a3.tar.gz
liveslak-0ae7492eeb91d5e08480204786bd882344ef15a3.tar.xz
iso2usb.sh: fix a logic error.
-rw-r--r--iso2usb.sh12
1 files changed, 8 insertions, 4 deletions
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: