diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-01-31 04:44:48 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-01-31 04:44:48 +0000 |
commit | 988ff532573b247356e749878818b4b7a0fd1325 (patch) | |
tree | 64c615005ab300f594110b3b6d2d32af43160f04 /src | |
parent | 9ab6e929dde0d7ae2987fb39c3a3953d633520b4 (diff) | |
download | bcfg2-988ff532573b247356e749878818b4b7a0fd1325.tar.gz bcfg2-988ff532573b247356e749878818b4b7a0fd1325.tar.bz2 bcfg2-988ff532573b247356e749878818b4b7a0fd1325.zip |
(Logical change 1.196)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@835 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/sbin/Bcfg2debug | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/sbin/Bcfg2debug b/src/sbin/Bcfg2debug index e69de29bb..1b9664527 100644 --- a/src/sbin/Bcfg2debug +++ b/src/sbin/Bcfg2debug @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +from time import sleep +from Bcfg2.Server.Core import Core + +def input(): + try: + return raw_input('> ') + except: + return '' + +if __name__ == '__main__': + core = Core('/etc/bcfg2.conf') + while core.fam.fm.pending(): + while core.fam.fm.pending(): + core.fam.HandleEvent() + sleep(0.5) + cmd = input() + while cmd != '': + if cmd == 'generators': + for generator in core.generators: + print generator.__version__ + else: + print "Unimplemented command %s" % cmd + cmd = input() |