1 """Generate Proper configuration file"""
7 # anyone can execute the get_file_flags operation (since it is applied
8 # within the caller's vserver and the command lsattr gives the same
9 # info anyway) or get the version string. wait is harmless too since
10 # the caller needs to know the child ID. and we let any slice unmount
11 # directories in its own filesystem, mostly as a workaround for some
20 for sliver in data['slivers']:
21 for attribute in sliver['attributes']:
22 if attribute['name'] == 'proper_op':
23 buf += "%s: %s\n" % (sliver['name'], attribute['value'])
25 try: os.makedirs("/etc/proper")
27 propd_conf = open("/etc/proper/propd.conf", "r+")
29 if propd_conf.read() != buf:
30 logger.log('proper: updating /etc/propd.conf')
34 logger.log('proper: restarting proper')
35 os.system('/etc/init.d/proper restart')
39 def start(options, config):