summaryrefslogtreecommitdiff
path: root/scripts/live-helpers
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/live-helpers')
-rw-r--r--scripts/live-helpers6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/live-helpers b/scripts/live-helpers
index cc73aa3..02c3e55 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -167,6 +167,7 @@ setup_loop ()
local pattern=${3}
local offset=${4}
local encryption=${5}
+ local readonly=${6}
modprobe -q -b "${module}"
udevsettle
@@ -178,6 +179,11 @@ setup_loop ()
dev=$(sys2dev "${loopdev}")
options=''
+ if [ -n ${readonly} ]
+ then
+ options="${options} -r"
+ fi
+
if [ 0 -lt "${offset}" ]
then
options="${options} -o ${offset}"