summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2011-11-10 19:24:13 +0100
committerDaniel Baumann <daniel@debian.org>2011-11-24 09:42:09 +0100
commit05dd30f7923913a060d7bef57b167386c988bc7c (patch)
treedd45edfd4dca8848b23c6390c3b8c7a539dc69d6 /scripts
parenta7e59be8118df46c9f43ba05561990ce3e62a81d (diff)
downloadlive-boot-05dd30f7923913a060d7bef57b167386c988bc7c.tar.gz
live-boot-05dd30f7923913a060d7bef57b167386c988bc7c.zip
Adding persistent-read-only boot parameter.
It currently only makes snapshots read-only. Support for overlays will be a bit more complicated to implement.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/live9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/live b/scripts/live
index 688c0a7..970853c 100755
--- a/scripts/live
+++ b/scripts/live
@@ -262,6 +262,10 @@ Arguments ()
PERSISTENT_PATH="${ARGUMENT#persistent-path=}"
export PERSISTENT_PATH
;;
+ persistent-read-only)
+ PERSISTENT_READONLY="Yes"
+ export PERSISTENT_READONLY
+ ;;
persistent-storage=*)
PERSISTENT_STORAGE="${ARGUMENT#persistent-storage=}"
@@ -1186,7 +1190,10 @@ try_snap ()
return 1
fi
- echo "export ${snap_type}SNAP=${snap_relpath}:${snapdev}:${snapfile}" >> snapshot.conf # for resync on reboot/halt
+ if [ -z ${PERSISTENT_READONLY} ]
+ then
+ echo "export ${snap_type}SNAP=${snap_relpath}:${snapdev}:${snapfile}" >> snapshot.conf # for resync on reboot/halt
+ fi
return 0
}