summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/sbin/bcfg2-query12
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]