From 41e9edcaf36bf2b7d56eee71bee80703176d111e Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Sun, 15 Jun 2008 05:30:42 +0100 Subject: Check losetup capabilities before specifying to mount as read-only. This is to retain compatibility with Etch's non-loop-aes-utils' losetup. --- scripts/live | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/live') 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" ] -- cgit v1.2.3