X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=components%2F9990-misc-helpers.sh;h=c59e40e5523b7e1b02eb9d5c6be408b27b81b521;hb=822706beb66f72389dc5e9328b52f1a9c0da04fe;hp=70f907a86b647c647b0591f511fe85aa525957e2;hpb=44e7b72fa71425b02ec770b1f3429b27a5cf6c51;p=live-boot-grml.git diff --git a/components/9990-misc-helpers.sh b/components/9990-misc-helpers.sh index 70f907a..c59e40e 100755 --- a/components/9990-misc-helpers.sh +++ b/components/9990-misc-helpers.sh @@ -1292,23 +1292,8 @@ do_union () rw_opt="rw" ro_opt="rr+wh" noxino_opt="noxino" - ;; - - unionfs-fuse) - rw_opt="RW" - ro_opt="RO" - ;; - - *) - rw_opt="rw" - ro_opt="ro" - ;; - esac - case "${UNIONTYPE}" in - unionfs-fuse) - unionmountopts="-o cow -o noinitgroups -o default_permissions -o allow_other -o use_ino -o suid" - unionmountopts="${unionmountopts} ${unionrw}=${rw_opt}" + unionmountopts="-o noatime,${noxino_opt},dirs=${unionrw}=${rw_opt}" if [ -n "${unionro}" ] then for rofs in ${unionro} @@ -1316,10 +1301,6 @@ do_union () unionmountopts="${unionmountopts}:${rofs}=${ro_opt}" done fi - ( sysctl -w fs.file-max=391524 ; ulimit -HSn 16384 - unionfs-fuse ${unionmountopts} "${unionmountpoint}" ) && \ - ( mkdir -p /run/sendsigs.omit.d - pidof unionfs-fuse >> /run/sendsigs.omit.d/unionfs-fuse || true ) ;; overlay) @@ -1333,21 +1314,18 @@ do_union () panic "overlay needs at least one lower filesystem (read-only branch)." fi unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}" - mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}" - ;; - - *) - unionmountopts="-o noatime,${noxino_opt},dirs=${unionrw}=${rw_opt}" - if [ -n "${unionro}" ] - then - for rofs in ${unionro} - do - unionmountopts="${unionmountopts}:${rofs}=${ro_opt}" - done - 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" mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}" ;; esac + + mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}" } get_custom_mounts ()