Commit a803b449 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Mount the media ro if --print-sysprep is specified

parent fa77d79a
......@@ -242,7 +242,8 @@ class DiskDevice(object):
"""Mount all disk partitions in a correct order."""
mount = self.g.mount_ro if readonly else self.g.mount
self.out.output("Mounting image...", False)
msg = " read-only" if readonly else ""
self.out.output("Mounting the media%s..." % msg, False)
mps = self.g.inspect_get_mountpoints(self.root)
# Sort the keys to mount the fs in a correct order.
......@@ -193,7 +193,8 @@ def image_creator():
dev = disk.get_device(snapshot)
# If no customization is to be applied, the image should be mounted ro
readonly = not (options.sysprep or options.shrink)
readonly = (not (options.sysprep or options.shrink) or
cls = os_cls(dev.distro, dev.ostype)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment