projects
/
snf-image-creator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3b7d3fc
)
In some circumstances mount the image readonly
author
Nikos Skalkotos
<skalkoto@grnet.gr>
Fri, 15 Jun 2012 08:55:35 +0000
(11:55 +0300)
committer
Nikos Skalkotos
<skalkoto@grnet.gr>
Fri, 15 Jun 2012 08:55:35 +0000
(11:55 +0300)
If no customization is to be applied the image should be mounted
readonly.
image_creator/main.py
patch
|
blob
|
history
diff --git
a/image_creator/main.py
b/image_creator/main.py
index
fa2e23d
..
af8f28e
100644
(file)
--- a/
image_creator/main.py
+++ b/
image_creator/main.py
@@
-185,7
+185,10
@@
def image_creator():
snapshot = disk.snapshot()
dev = disk.get_device(snapshot)
- dev.mount()
+
+ # If no customization is to be applied, the image should be mounted ro
+ readonly = not (options.sysprep or options.shrink)
+ dev.mount(readonly)
cls = os_cls(dev.distro, dev.ostype)
image_os = cls(dev.root, dev.g, out)