X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=blobdiff_plain;f=components%2F9990-misc-helpers.sh;h=39e609d3a2619ef15f15116d524afe6c984b2b22;hp=a97615bb6ddc5f128eeafa0be2d10e8e121dc1f5;hb=f5716f9a79564e44e38f5d4164a4dc1d77cb8c3a;hpb=6f465ddc145fb527215865ed042875d231d8dcfd diff --git a/components/9990-misc-helpers.sh b/components/9990-misc-helpers.sh index a97615b..39e609d 100755 --- a/components/9990-misc-helpers.sh +++ b/components/9990-misc-helpers.sh @@ -114,7 +114,7 @@ check_dev () ISO_DEVICE=$(dirname ${ISO_DEVICE}) [ -b "$ISO_DEVICE" ] && break i=$(($i -1)) - done + done fi if [ "$ISO_DEVICE" = "/" ] @@ -1080,18 +1080,18 @@ find_persistence_media () result=$(probe_for_file_name "${overlays}" ${dev}) if [ -n "${result}" ] then - local loopdevice + local loopdevice loopdevice=${result##*=} - if is_in_comma_sep_list luks ${PERSISTENCE_ENCRYPTION} && is_luks_partition ${loopdevice} + if is_in_comma_sep_list luks ${PERSISTENCE_ENCRYPTION} && is_luks_partition ${loopdevice} then - local luksfile + local luksfile luksfile="" if luksfile=$(open_luks_device "${loopdevice}") then - result=${result%%=*} + result=${result%%=*} result="${result}=${luksfile}" else - losetup -d $loopdevice + losetup -d $loopdevice result="" fi fi @@ -1310,15 +1310,14 @@ do_union () ;; overlay) - # XXX: can multiple unionro be used? (overlay only handles two dirs, but perhaps they can be chained?) - # XXX: and can unionro be optional? i.e. can overlay skip lowerdir? - if echo ${unionro} | grep -q " " - then - panic "Multiple lower filesystems are currently not supported with overlay (unionro = ${unionro})." - elif [ -z "${unionro}" ] + # XXX: can unionro be optional? i.e. can overlay skip lowerdir? + if [ -z "${unionro}" ] then panic "overlay needs at least one lower filesystem (read-only branch)." fi + # Multiple lower layers can now be given using the the colon (":") as a + # separator character between the directory names. + unionro="$(echo ${unionro} | sed -e 's| |:|g')" # overlayfs requires: # + a workdir to become mounted # + workdir and upperdir to reside under the same mount