Check losetup capabilities before specifying to mount as read-only.
[live-boot-grml.git] / scripts / live-helpers
index 02c3e55..20952f3 100644 (file)
@@ -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}" ]