summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-04-24 17:46:03 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-04-24 17:46:03 +0000
commit58df03a96dc4b3ded7974a7fb0ca0c3976591eaa (patch)
treed7a468cc0ac94bdfbb231fc502a6ce4ce749bbe4
parent314020e006edaae64f82d82408cb7af59d909d35 (diff)
downloadbcfg2-58df03a96dc4b3ded7974a7fb0ca0c3976591eaa.tar.gz
bcfg2-58df03a96dc4b3ded7974a7fb0ca0c3976591eaa.tar.bz2
bcfg2-58df03a96dc4b3ded7974a7fb0ca0c3976591eaa.zip
implement bcfg2-info non-interactive mode
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4556 ce84e21b-d406-0410-9b95-82705330c041
-rwxr-xr-xsrc/sbin/bcfg2-info6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info
index ef5db6f6a..533a8acef 100755
--- a/src/sbin/bcfg2-info
+++ b/src/sbin/bcfg2-info
@@ -278,4 +278,8 @@ if __name__ == '__main__':
loop = infoCore(setup['repo'], setup['structures'], setup['generators'],
setup['password'], setup['svn'])
loop.plugins['Metadata'].load_probedata()
- loop.do_loop()
+ if len(sys.argv) > 1:
+ loop.onecmd(" ".join(sys.argv[1:]))
+ raise SystemExit(0)
+ else:
+ loop.do_loop()