Adjusting whitespace to tabs on components/9990-misc-helpers.sh
[live-boot-grml.git] / components / 9990-misc-helpers.sh
index e58f283..943e73b 100755 (executable)
@@ -114,7 +114,7 @@ check_dev ()
                                ISO_DEVICE=$(dirname ${ISO_DEVICE})
                                [ -b "$ISO_DEVICE" ] && break
                                i=$(($i -1))
-                       done
+                       done
                fi
 
                if [ "$ISO_DEVICE" = "/" ]
@@ -1074,18 +1074,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
@@ -1313,20 +1313,13 @@ do_union ()
                        then
                                panic "overlay needs at least one lower filesystem (read-only branch)."
                        fi
-                       unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}"
-                       if ! mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}" 2>/dev/null
-                       then
-                               # Ref: kiwi from OpenSuse kiwi-7.02.18-1.1
-                               # overlayfs in version >= v22 behaves differently
-                               # + renamed from overlayfs to overlay
-                               # + requires a workdir to become mounted
-                               # + requires workdir and upperdir to reside under the same mount
-                               # + requires workdir and upperdir to be in separate subdirs
-                               mkdir ${unionrw}/rw
-                               mkdir ${unionrw}/work
-                               unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}/rw,workdir=${unionrw}/work"
-                               mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}"
-                       fi
+                       # overlayfs requires:
+                       # + a workdir to become mounted
+                       # + workdir and upperdir to reside under the same mount
+                       # + workdir and upperdir to be in separate directories
+                       mkdir "${unionrw}/rw"
+                       mkdir "${unionrw}/work"
+                       unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}/rw,workdir=${unionrw}/work"
                        ;;
        esac