From: Evgeni Golov Date: Sun, 20 Dec 2015 19:07:07 +0000 (+0100) Subject: Merge remote-tracking branch 'grml' X-Git-Tag: debian/1%20160511~9 X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=commitdiff_plain;h=f5716f9a79564e44e38f5d4164a4dc1d77cb8c3a;hp=-c Merge remote-tracking branch 'grml' --- f5716f9a79564e44e38f5d4164a4dc1d77cb8c3a diff --combined components/9990-misc-helpers.sh index 83eca32,a97615b..39e609d --- a/components/9990-misc-helpers.sh +++ b/components/9990-misc-helpers.sh @@@ -114,7 -114,7 +114,7 @@@ check_dev ( ISO_DEVICE=$(dirname ${ISO_DEVICE}) [ -b "$ISO_DEVICE" ] && break i=$(($i -1)) - done + done fi if [ "$ISO_DEVICE" = "/" ] @@@ -420,6 -420,12 +420,12 @@@ is_supported_fs ( return 1 fi + # get_fstype might report "unknown" or "swap", ignore it as no such kernel module exists + if [ "${fstype}" = "unknown" ] || [ "${fstype}" = "swap" ] + then + return 1 + fi + # Try to look if it is already supported by the kernel if grep -q ${fstype} /proc/filesystems then @@@ -1074,18 -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 @@@ -1304,14 -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