[SCM] debian-live branch, master, updated. 1.130.1-3-36-gfa1fc24
Chris Lamb
chris at chris-lamb.co.uk
Sun Jun 15 04:34:36 UTC 2008
The following commit has been merged in the master branch:
commit fa1fc2451b08f8b2b2ed9547cb68d35dde2f44f8
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date: Sun Jun 15 05:30:42 2008 +0100
Check losetup capabilities before specifying to mount as read-only.
This is to retain compatibility with Etch's non-loop-aes-utils' losetup.
Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>
diff --git a/scripts/live b/scripts/live
index 3f39c97..ee363c3 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1008,7 +1008,12 @@ setup_unionfs ()
rofslist="${image} ${rofslist}"
elif [ -f "${image}" ]
then
- backdev=$(get_backing_device "${image}" "-r")
+ if /sbin/losetup --help 2>&1 | grep -q -- "-r\b"
+ then
+ backdev=$(get_backing_device "${image}" "-r")
+ else
+ backdev=$(get_backing_device "${image}")
+ fi
fstype=$(get_fstype "${backdev}")
if [ "${fstype}" = "unknown" ]
diff --git a/scripts/live-helpers b/scripts/live-helpers
index 02c3e55..20952f3 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -181,7 +181,10 @@ setup_loop ()
if [ -n ${readonly} ]
then
- options="${options} -r"
+ if /sbin/losetup --help 2>&1 | grep -q -- "-r\b"
+ then
+ options="${options} -r"
+ fi
fi
if [ 0 -lt "${offset}" ]
--
debian-live
More information about the debian-live-changes
mailing list