[Fedora-livecd-list] [PATCH] if mounting squashfs add ro mount option

Joey Boggs jboggs at redhat.com
Mon Jul 9 18:38:50 UTC 2012


This just adds the ro mount option when using squashfs images otherwise we get output
saying read/write mount failed switching to readonly.

Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
 imgcreate/fs.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index da444e4..d4558d3 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -433,7 +433,8 @@ class DiskMount(Mount):
         args = [ "/bin/mount", self.disk.device, self.mountdir ]
         if self.fstype:
             args.extend(["-t", self.fstype])
-
+        if self.fstype == "squashfs":
+            args.extend(["-o", "ro"])
         rc = call(args)
         if rc != 0:
             raise MountError("Failed to mount '%s' to '%s'" %
-- 
1.7.10.2



More information about the livecd mailing list