diff options
author | Luca Lesinigo <luca@luckyluke.org> | 2008-09-03 14:00:35 -0400 |
---|---|---|
committer | Adrian Likins <alikins@redhat.com> | 2008-09-03 14:00:35 -0400 |
commit | c2f49b916b16f3049a9263ff0b2218df9d590e97 (patch) | |
tree | 75f832e9faed9ae5cc9290690f491a7fc44f786f /func | |
parent | 72d55f5eb4630f2a7af9115479f26d0611a72a2b (diff) | |
download | func-c2f49b916b16f3049a9263ff0b2218df9d590e97.tar.gz func-c2f49b916b16f3049a9263ff0b2218df9d590e97.tar.xz func-c2f49b916b16f3049a9263ff0b2218df9d590e97.zip |
Add a new --list-modules to the minion (funcd). The new option will let it print the list of loaded modules and quit.
patch from Luca Lesinigo <luca@luckyluke.org>
Diffstat (limited to 'func')
-rwxr-xr-x | func/minion/server.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/func/minion/server.py b/func/minion/server.py index 9bd77b0..64a8645 100755 --- a/func/minion/server.py +++ b/func/minion/server.py @@ -247,6 +247,14 @@ def main(argv): Start things up. """ + if len(sys.argv) > 1 and sys.argv[1] == "--list-modules": + module_names = module_loader.load_modules().keys() + module_names.sort() + print "loaded modules:" + for foo in module_names: + print "\t" + foo + sys.exit(0) + if "daemon" in sys.argv or "--daemon" in sys.argv: utils.daemonize("/var/run/funcd.pid") else: |