X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=components%2F9990-overlay.sh;h=8350502460d9bead4f9cb68d5227887368eefcd8;hb=HEAD;hp=37e8499273a29b8f4bd32eba641d694e89f716b5;hpb=0d878d3a679820d570a20c0fa1c1a2c5b92ad037;p=live-boot-grml.git diff --git a/components/9990-overlay.sh b/components/9990-overlay.sh index 37e8499..8350502 100755 --- a/components/9990-overlay.sh +++ b/components/9990-overlay.sh @@ -195,12 +195,15 @@ setup_unionfs () do media="$(echo ${media} | tr ":" " ")" - case ${media} in - ${custom_overlay_label}=*) - device="${media#*=}" - overlay_devices="${overlay_devices} ${device}" - ;; - esac + for overlay_label in ${custom_overlay_label} + do + case ${media} in + ${overlay_label}=*) + device="${media#*=}" + overlay_devices="${overlay_devices} ${device}" + ;; + esac + done done fi elif [ -n "${NFS_COW}" ] && [ -z "${NOPERSISTENCE}" ] @@ -239,7 +242,7 @@ setup_unionfs () if [ -n "${PERSISTENCE_READONLY}" ] && [ "${cowdevice}" != "tmpfs" ] then - mount -t tmpfs -o rw,noatime,mode=755,size=${OVERLAY_SIZE:-50%} tmpfs "/live/overlay" + mount -t tmpfs -o rw,noatime,mode=755,size=${OVERLAY_SIZE:-50%} tmpfs "/run/live/overlay" root_backing="/run/live/persistence/$(basename ${cowdevice})-root" mkdir -p ${root_backing} else @@ -307,6 +310,12 @@ setup_unionfs () chmod 1777 "${rootmnt}"/tmp fi + # Correct the permission of /var/tmp: + if [ -d "${rootmnt}/var/tmp" ] + then + chmod 1777 "${rootmnt}"/var/tmp + fi + # Adding custom persistence if [ -n "${PERSISTENCE}" ] && [ -z "${NOPERSISTENCE}" ] then