From cd14868d4db8eaa7e9421e1d5fe8653294ac1e38 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Thu, 27 Jun 2013 10:36:17 -0400 Subject: Options: migrated tools to new parser --- tools/upgrade/1.1/posixunified.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) mode change 100644 => 100755 tools/upgrade/1.1/posixunified.py (limited to 'tools/upgrade/1.1/posixunified.py') diff --git a/tools/upgrade/1.1/posixunified.py b/tools/upgrade/1.1/posixunified.py old mode 100644 new mode 100755 index 8eb4ed734..b6ce7bc90 --- a/tools/upgrade/1.1/posixunified.py +++ b/tools/upgrade/1.1/posixunified.py @@ -17,12 +17,13 @@ NOTE: This script takes a conservative approach when it comes to """ if __name__ == '__main__': - opts = { - 'repo': Bcfg2.Options.SERVER_REPOSITORY, - } - setup = Bcfg2.Options.OptionParser(opts) - setup.parse(sys.argv[1:]) - repo = setup['repo'] + parser = Bcfg2.Options.get_parser( + description="Migrate from Bcfg2 1.0-style POSIX entries to 1.1-style " + "unified Path entries") + parser.add_options([Bcfg2.Options.Common.repository]) + parser.parse() + + repo = Bcfg2.Options.setup.repository unifiedposixrules = "%s/Rules/unified-rules.xml" % repo rulesroot = lxml.etree.Element("Rules") -- cgit v1.2.3-1-g7c22