From 988ff532573b247356e749878818b4b7a0fd1325 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 31 Jan 2005 04:44:48 +0000 Subject: (Logical change 1.196) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@835 ce84e21b-d406-0410-9b95-82705330c041 --- src/sbin/Bcfg2debug | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/sbin/Bcfg2debug') 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() -- cgit v1.2.3-1-g7c22