#!/usr/bin/python

__revision__ = "$Revision: $"

import Bcfg2.Client.Proxy, os

if not os.getuid() == 0:
    print 'this command must be run as root'
    raise SystemExit

proxy = Bcfg2.Client.Proxy.bcfg2()
print 'building files...'
proxy.run_method('Hostbase.rebuildState', ())
print 'running bcfg...'
os.system('bcfg2 -q -d -v')



syntax highlighted by Code2HTML, v. 0.9.1