summaryrefslogtreecommitdiffstats
path: root/tools/hostbasepush.py
blob: 070711c822a0428aec8141b016ae9d549c40a050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python

__revision__ = "$Revision: $"

import os
import Bcfg2.Client.Proxy

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')