From 27415316206b00638bb5c67030ce705292f79b80 Mon Sep 17 00:00:00 2001 From: Faiyaz Ahmed Date: Wed, 4 Jun 2008 19:58:38 +0000 Subject: [PATCH] RIP Proper. --- nm.py | 2 +- proper.py | 40 ---------------------------------------- 2 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 proper.py diff --git a/nm.py b/nm.py index b61ae1a..8e30be8 100755 --- a/nm.py +++ b/nm.py @@ -20,7 +20,7 @@ import net id="$Id$" savedargv = sys.argv[:] -known_modules=['proper', 'conf_files', 'sm', 'bwmon', 'vsys', 'codemux'] +known_modules=['conf_files', 'sm', 'bwmon', 'vsys', 'codemux'] parser = optparse.OptionParser() parser.add_option('-d', '--daemon', action='store_true', dest='daemon', default=False, help='run daemonized') diff --git a/proper.py b/proper.py deleted file mode 100644 index dea0db9..0000000 --- a/proper.py +++ /dev/null @@ -1,40 +0,0 @@ -"""Generate Proper configuration file""" - -import os -import logger - -def GetSlivers(data): - # anyone can execute the get_file_flags operation (since it is applied - # within the caller's vserver and the command lsattr gives the same - # info anyway) or get the version string. wait is harmless too since - # the caller needs to know the child ID. and we let any slice unmount - # directories in its own filesystem, mostly as a workaround for some - # Stork problems. - buf = """ -*: get_file_flags -*: version -*: wait -+: unmount -""".lstrip() - - for sliver in data['slivers']: - for attribute in sliver['attributes']: - if attribute['tagname'] == 'proper_op': - buf += "%s: %s\n" % (sliver['name'], attribute['value']) - - try: os.makedirs("/etc/proper") - except OSError: pass - propd_conf = open("/etc/proper/propd.conf", "r+") - - if propd_conf.read() != buf: - logger.log('proper: updating /etc/propd.conf') - propd_conf.seek(0) - propd_conf.write(buf) - propd_conf.truncate() - logger.log('proper: restarting proper') - os.system('/etc/init.d/proper restart') - - propd_conf.close() - -def start(options, config): - pass -- 2.43.0