From 6d2d94ad580fe2c6bde855447498851dd00f0910 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 21 Jun 2016 23:23:24 +0200 Subject: iso2usb.sh: try to fix custom persistence configuration. --- iso2usb.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'iso2usb.sh') diff --git a/iso2usb.sh b/iso2usb.sh index ad118f9..b551623 100644 --- a/iso2usb.sh +++ b/iso2usb.sh @@ -187,17 +187,23 @@ update_initrd() { echo "$OLDLUKS" >> luksdev if [ "${PERSISTENCE}" != "${DEF_PERSISTENCE}" ]; then # If the user specified a nonstandard persistence, use that: + echo "--- Updating persistence from '$OLDPERSISTENCE' to '$PERSISTENCE'" sed -i -e "s,^PERSISTENCE=.*,PERSISTENCE=\"${PERSISTENCE}\"," init elif ["${PERSISTENCE}" != "${OLDPERSISTENCE}" ]; then - # The user did not specify persistence, re-use the custome value: + # The user did not specify persistence, re-use the retrieved value: sed -i -e "s,^PERSISTENCE=.*,PERSISTENCE=\"${OLDPERSISTENCE}\"," init - echo "--- Updating 'persistence' from '$PERSISTENCE' to '$OLDPERSISTENCE':" + echo "--- Updating persistence from '$PERSISTENCE' to '$OLDPERSISTENCE'" PERSISTENCE="${OLDPERSISTENCE}" fi else - echo "--- Updating 'waitforroot' time from '$OLDWAIT' to '$WAIT':" + if [ "${PERSISTENCE}" != "${DEF_PERSISTENCE}" ]; then + # If the user specified a nonstandard persistence, use that: + echo "--- Updating persitence from '$DEF_PERSISTENCE' to '$PERSISTENCE'" + sed -i -e "s,^PERSISTENCE=.*,PERSISTENCE=\"${PERSISTENCE}\"," init + fi fi + echo "--- Updating 'waitforroot' time from '$OLDWAIT' to '$WAIT'" echo ${WAIT} > wait-for-root if [ $DOLUKS -eq 1 -a -n "${LUKSHOME}" ]; then -- cgit v1.2.3