imgcreate/fs.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 51582cd889ab721d09c576008e6b93f2ca26e89c
Author: Joey Boggs <jboggs(a)redhat.com>
Date: Mon Jul 9 14:38:50 2012 -0400
if mounting squashfs add ro mount option
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(a)redhat.com>
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'" %
Show replies by date