summaryrefslogtreecommitdiff
path: root/scripts/boot/0120-read-only
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-07-25 16:46:11 +0200
committerDaniel Baumann <daniel@debian.org>2012-07-25 17:25:04 +0200
commitdffc7e9ae4ff75c3110db7c24556fa6796ae5437 (patch)
tree05535ec73f7600ed817f09e261f74a5c6cb44008 /scripts/boot/0120-read-only
parentd0fe6311af9fbeaa1f6dbc185fa97e1ce4f5347d (diff)
downloadlive-boot-dffc7e9ae4ff75c3110db7c24556fa6796ae5437.tar.gz
live-boot-dffc7e9ae4ff75c3110db7c24556fa6796ae5437.zip
Making read-only function self contained.
Diffstat (limited to 'scripts/boot/0120-read-only')
-rwxr-xr-xscripts/boot/0120-read-only14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/boot/0120-read-only b/scripts/boot/0120-read-only
index 588d57b..948c2d5 100755
--- a/scripts/boot/0120-read-only
+++ b/scripts/boot/0120-read-only
@@ -4,6 +4,20 @@
Read_only ()
{
+ for _PARAMETER in ${_CMDLINE}
+ do
+ case "${_PARAMETER}" in
+ live-boot.read-only|read-only)
+ LIVE_READ_ONLY="true"
+ ;;
+ esac
+ done
+
+ if [ "${LIVE_READ_ONLY}" != "true" ]
+ then
+ return 0
+ fi
+
# Marking some block devices as read-only to ensure that nothing
# gets written as linux still writes to 'only' read-only mounted filesystems.
_DEVICES="/dev/sd* /dev/vd*"