commit 840ca52675c0626699e9f487f625fc9bd28e9580
Author: Frederick Grose <fgrose(a)sugarlabs.org>
Date: Mon Oct 22 17:22:30 2012 -0400
Catch up with creator.py changes.
Remove and symlink /etc/mtab.
Support new docleanup attribute.
diff --git a/tools/edit-livecd b/tools/edit-livecd
index 1670228..a033f59 100755
--- a/tools/edit-livecd
+++ b/tools/edit-livecd
@@ -248,7 +248,9 @@ class LiveImageEditor(LiveImageCreator):
self._do_bindmounts()
- os.symlink("../proc/mounts", self._instroot + "/etc/mtab")
+ mtab = os.path.join(self._instroot, 'etc', 'mtab')
+ os.remove(mtab)
+ os.symlink('/proc/self/mounts', mtab)
self.__copy_img_root(base_on)
self._brand(self._builder)
@@ -547,6 +549,7 @@ def parse_options(args):
[-k <kickstart-file>]
[-s <script.sh>]
[-t <tmpdir>]
+ [-T, --leave-tmpfiles]
[-e <excludes>]
[-f <exclude-file>]
[-i <includes>]
@@ -576,6 +579,11 @@ def parse_options(args):
dest="tmpdir", default="/var/tmp",
help="Temporary directory to use (default:
/var/tmp)")
+ parser.add_option("-T", "--leave-tmpfiles",
action="store_false",
+ dest="docleanup", default=True,
+ help='Skip deletion of temporary files and
directories '
+ 'and unmounting of the edited image.')
+
parser.add_option("-e", "--exclude", type="string",
dest="exclude",
help="Specify directory or file patterns to be
excluded "
"from the rsync copy of the filesystem.")
@@ -679,6 +687,7 @@ def main():
editor._include = options.include
editor.clone = options.clone
editor.tmpdir = options.tmpdir
+ editor.docleanup = options.docleanup
editor._builder = options.builder
editor._releasefile = options.releasefile
editor.compress_type = options.compress_type
Show replies by date