Dropping unionfs support, long superseeded with aufs.
[live-boot-grml.git] / components / 9990-overlay.sh
index 4ae5c07..d293ead 100755 (executable)
@@ -9,22 +9,13 @@ setup_unionfs ()
        addimage_directory="${3}"
 
        case ${UNIONTYPE} in
-               aufs|unionfs|overlayfs)
-                       modprobe -q -b ${UNIONTYPE}
-
-                       if ! cut -f2 /proc/filesystems | grep -q "^${UNIONTYPE}\$" && [ -x /bin/unionfs-fuse ]
+               aufs|overlay)
+                       if ! cut -f2 /proc/filesystems | grep -q "^${UNIONTYPE}\$"
                        then
-                               echo "${UNIONTYPE} not available, falling back to unionfs-fuse."
-                               echo "This might be really slow."
-
-                               UNIONTYPE="unionfs-fuse"
+                               panic "${UNIONTYPE} not available."
                        fi
-                       ;;
-       esac
 
-       case "${UNIONTYPE}" in
-               unionfs-fuse)
-                       modprobe fuse
+                       modprobe -q -b ${UNIONTYPE}
                        ;;
        esac
 
@@ -358,15 +349,7 @@ setup_unionfs ()
                                # do nothing # mount -o bind "${d}" "${live_rootfs}"
                                ;;
                        *)
-                               case "${UNIONTYPE}" in
-                                       unionfs-fuse)
-                                               mount -o bind "${d}" "${live_rootfs}"
-                                               ;;
-
-                                       *)
-                                               mount -o move "${d}" "${live_rootfs}"
-                                               ;;
-                               esac
+                               mount -o move "${d}" "${live_rootfs}"
                                ;;
                esac
        done
@@ -376,7 +359,7 @@ setup_unionfs ()
        then
                local custom_mounts
                custom_mounts="/tmp/custom_mounts.list"
-               rm -rf ${custom_mounts} 2> /dev/null
+               rm -f ${custom_mounts}
 
                # Gather information about custom mounts from devies detected as overlays
                get_custom_mounts ${custom_mounts} ${overlay_devices}
@@ -387,7 +370,7 @@ setup_unionfs ()
                local used_overlays
                used_overlays=""
                used_overlays=$(activate_custom_mounts ${custom_mounts})
-               rm ${custom_mounts}
+               rm -f ${custom_mounts}
 
                # Close unused overlays (e.g. due to missing $persistence_list)
                for overlay in ${overlay_devices}