This is to retain compatibility with Etch's non-loop-aes-utils' losetup.
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" ]
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}" ]