tools/edit-livecd | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
New commits:
commit cc95208e3c1cefb5f1e28af919201f4179b4cda5
Author: Joey Boggs <jboggs(a)redhat.com>
Date: Mon Feb 13 21:40:56 2012 -0500
check for valid script path before editing livecd image and update usage options confusion
diff --git a/tools/edit-livecd b/tools/edit-livecd
index 72ec059..0df2fa8 100755
--- a/tools/edit-livecd
+++ b/tools/edit-livecd
@@ -543,17 +543,17 @@ class LiveImageEditor(LiveImageCreator):
def parse_options(args):
parser = optparse.OptionParser(usage = """
%prog [-n=<name>]
- [-o=<output>]
- [-k=<kickstart-file>]
- [-s=<script.sh>]
- [-t=<tmpdir>]
- [-e=<excludes>]
- [-f=<exclude-file>]
- [-i=<includes>]
- [-r=<releasefile>]
- [-b=<builder>]
+ [-o <output>]
+ [-k <kickstart-file>]
+ [-s <script.sh>]
+ [-t <tmpdir>]
+ [-e <excludes>]
+ [-f <exclude-file>]
+ [-i <includes>]
+ [-r <releasefile>]
+ [-b <builder>]
[--clone]
- [-c=<compress_type>]
+ [-c <compress_type>]
[--skip-compression]
[--skip-minimize]
<LIVEIMG.src>""")
@@ -690,6 +690,10 @@ def main():
editor.ks = read_kickstart(options.kscfg)
# part / --size <new rootfs size to be resized to>
editor._LoopImageCreator__image_size = kickstart.get_image_size(editor.ks)
+ if options.script:
+ if not os.path.exists(options.script):
+ print "Invalid Script Path '%s'" % options.script
+ return 1
editor.mount(LiveOS, cachedir = None)
editor._configure_bootloader(editor._LiveImageCreatorBase__isodir)
if editor.ks: