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

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