liveusb-creator liveusb/creator.py

Luke Macken lmacken at fedoraproject.org
Sun Oct 12 09:16:10 UTC 2008


 liveusb-creator    |    4 ++++
 liveusb/creator.py |    3 +++
 2 files changed, 7 insertions(+)

New commits:
commit 3f08445783194ef85a5af4b15cb446c4e8e9adc7
Author: Luke Macken <lmacken at redhat.com>
Date:   Sun Oct 12 05:16:06 2008 -0400

    Add an '--extra-kernel-args' argument

diff --git a/liveusb-creator b/liveusb-creator
index e800250..5803f66 100755
--- a/liveusb-creator
+++ b/liveusb-creator
@@ -34,6 +34,10 @@ def parse_args():
                       help='Skip checksum verification')
     parser.add_option('-v', '--verbose', dest='verbose', action='store_true',
                       help='Output extra debugging messages')
+    parser.add_option('-k', '--extra-kernel-args', dest='kernel_args',
+                      action='store', metavar='ARGS', 
+                      help='Supply extra kernel arguments'
+                           ' (eg: -k noswap,selinux=0,elevator=noop)')
     parser.add_option('-x', '--xo', dest='xo', action='store_true',
                       help='Make it bootable on the OLPC')
     return parser.parse_args() # (opts, args)
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 1e7fdc3..561b38c 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -251,6 +251,9 @@ class LiveUSBCreator(object):
             if self.overlay and "liveimg" in line:
                 line = line.replace("liveimg", "liveimg overlay=" + usblabel)
                 line = line.replace(" ro ", " rw ")
+            if self.opts.kernel_args:
+                line = line.replace("liveimg", "liveimg %s" %
+                                    ' '.join(self.opts.kernel_args.split(',')))
             syslinux.write(line)
         isolinux.close()
         syslinux.close()




More information about the liveusb-creator mailing list