summaryrefslogtreecommitdiff
path: root/scripts/boot
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-07-25 17:00:45 +0200
committerDaniel Baumann <daniel@debian.org>2012-07-25 17:25:04 +0200
commit7b0335fb8d508c2703c8ee18fed52312a4bcba49 (patch)
tree009065c3d60be0579dc27e1befdcf98c01d0c849 /scripts/boot
parente8ced87a39fc0a748506f0663ac61449685d5957 (diff)
downloadlive-boot-7b0335fb8d508c2703c8ee18fed52312a4bcba49.tar.gz
live-boot-7b0335fb8d508c2703c8ee18fed52312a4bcba49.zip
Extending read-only parameters to allow specifying custom list of devices.
Diffstat (limited to 'scripts/boot')
-rwxr-xr-xscripts/boot/0120-read-only9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/boot/0120-read-only b/scripts/boot/0120-read-only
index 948c2d5..c05c162 100755
--- a/scripts/boot/0120-read-only
+++ b/scripts/boot/0120-read-only
@@ -7,6 +7,11 @@ Read_only ()
for _PARAMETER in ${_CMDLINE}
do
case "${_PARAMETER}" in
+ live-boot.read-only=*|read-only=*)
+ LIVE_READ_ONLY="true"
+ LIVE_READ_ONLY_DEVICES="${_PARAMETER#*read-only=}"
+ ;;
+
live-boot.read-only|read-only)
LIVE_READ_ONLY="true"
;;
@@ -20,9 +25,9 @@ Read_only ()
# 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*"
+ LIVE_READ_ONLY_DEVICES="${LIVE_READ_ONLY_DEVICES:-/dev/sd* /dev/vd*}"
- for _DEVICE in ${_DEVICES}
+ for _DEVICE in $(echo ${LIVE_READ_ONLY_DEVICES} | sed -e 's|,| |g')
do
if [ ! -b "${_DEVICE}" ]
then