---
snake-install | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/snake-install b/snake-install
index c50bff9..bb3c64e 100755
--- a/snake-install
+++ b/snake-install
@@ -44,6 +44,9 @@ def setup_option_parser():
parser.add_option("-a", "--arch",
action="store", dest="arch",
default=rpmUtils.arch.getBaseArch(),
help="Only include trees of specified architecture (default:
%default)")
+ parser.add_option("-c", "--cmdline",
+ action="store", dest="cmdline",
default="",
+ help="Specify command-line arguments to pass to the
installer")
parser.add_option("-v", "--verbose",
action="store_true", dest="verbose", default=False,
help="Output extra information")
@@ -80,7 +83,7 @@ if __name__ == '__main__':
# dictionary to hold fetch_and_prep arguments
fpargs = dict()
- # read supplied kickstart file
+ # Read supplied kickstart file
if ksfile:
# TODO - support http/ftp URI's?
if os.path.isfile(ksfile):
@@ -91,6 +94,10 @@ if __name__ == '__main__':
parser.error("Unable to open '%s'" % ksfile)
sys.exit(1)
+ # Supply any cmdline parameters provided by user
+ if opt.cmdline:
+ fpargs["args"] = self.cfg.kernel_args
+
# Are any arch overrides needed?
# FIXME: this sort of monkeying with arch should really happen in the
# client libs, rather than each app..
@@ -104,7 +111,10 @@ if __name__ == '__main__':
if fpargs["arch"] == 'ppc' and os.uname()[4] == 'ppc64':
fpargs["arch"] = 'ppc64'
+ # Build a progress meter callback
fpargs['progress_callback'] = progress.TextMeter()
+
+ # Fetch and prep install images
try:
snake.install.fetch_and_prep(uri,**fpargs)
t = snake.uri.uri_to_tree(uri)
--
1.5.4.5