summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2011-11-23 11:16:43 +0100
committerDaniel Baumann <daniel@debian.org>2011-11-24 09:42:09 +0100
commitc70525edd757583351b41f6f00d7f94fd892bbfa (patch)
tree940fb795c8deb7e9c6dcb249ad82d73f1fa6b57c /scripts
parent1c4b879455daf67dd0f873c753f3f963d63f1c8b (diff)
downloadlive-boot-c70525edd757583351b41f6f00d7f94fd892bbfa.tar.gz
live-boot-c70525edd757583351b41f6f00d7f94fd892bbfa.zip
Making persistent-read-only work for home-rw overlays.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/live12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/live b/scripts/live
index c28314f..a8ac678 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1578,7 +1578,17 @@ setup_unionfs ()
if [ -b "${homecow}" ]
then
- mount -t $(get_fstype "${homecow}") -o rw,noatime "${homecow}" "${rootmnt}/home"
+ if [ -z "${PERSISTENT_READONLY}" ]
+ then
+ mount -t $(get_fstype "${homecow}") -o rw,noatime "${homecow}" "${rootmnt}/home"
+ else
+ homerw="/cow/home"
+ homero="/$(basename ${homecow})-backing"
+ homemountpoint="${rootmnt}/home"
+ mkdir -p ${homerw} ${homero} ${homemountpoint}
+ mount -t $(get_fstype "${homecow}") -o ro "${homecow}" "${homero}"
+ mount -t "${UNIONTYPE}" -o "noatime,${noxino_opt}dirs=${homerw}=rw:${homero}=${roopt}" "${UNIONTYPE}" "${homemountpoint}"
+ fi
export HOMEMOUNTED=1 # used to proper calculate free space in do_snap_copy()
else
log_warning_msg "Unable to find the persistent home medium"