diff options
author | Robert Gogolok <gogo@cs.uni-sb.de> | 2007-12-30 19:31:23 +0000 |
---|---|---|
committer | Robert Gogolok <gogo@cs.uni-sb.de> | 2007-12-30 19:31:23 +0000 |
commit | d57ec8b80f66b1618e0a1b51885a29036effa6e9 (patch) | |
tree | 579e189e9b1a41030dbb4b142838415a647b6efa /src | |
parent | e8c9ba57d10d174c79ac1aae9b53661ee8464d0f (diff) | |
download | bcfg2-d57ec8b80f66b1618e0a1b51885a29036effa6e9.tar.gz bcfg2-d57ec8b80f66b1618e0a1b51885a29036effa6e9.tar.bz2 bcfg2-d57ec8b80f66b1618e0a1b51885a29036effa6e9.zip |
bcfg2-query: use Bcfg2.Settings
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4132 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rwxr-xr-x | src/sbin/bcfg2-query | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sbin/bcfg2-query b/src/sbin/bcfg2-query index 3f0209192..46d4fab3c 100755 --- a/src/sbin/bcfg2-query +++ b/src/sbin/bcfg2-query @@ -1,13 +1,10 @@ #!/usr/bin/python +# FIXME add -C <configfile> support + import lxml.etree, sys, ConfigParser -CP = ConfigParser.ConfigParser() -CP.read(['/etc/bcfg2.conf']) -try: - prefix = CP.get('server', 'repository') -except: - prefix = "/var/lib/bcfg2" +from Bcfg2.Settings import settings if len(sys.argv) < 2: print "Usage bcfg2-query -d|u|p <profile name>" @@ -20,6 +17,9 @@ if len(sys.argv) < 2: print "\t -a\t shows all clients" sys.exit(1) +prefix = settings.SERVER_REPOSITORY + + xml = lxml.etree.parse('%s/Metadata/clients.xml'%prefix) if '-p' in sys.argv: profile = sys.argv[sys.argv.index('-p') + 1] |