diff options
author | Michael Fenn <fennm@deshawresearch.com> | 2014-04-07 18:52:31 -0400 |
---|---|---|
committer | Michael Fenn <fennm@deshawresearch.com> | 2014-04-07 18:52:31 -0400 |
commit | b2a5bacaac8e94f35c4c6eb86642ba978748777b (patch) | |
tree | 5b1644c7cf012434f02a39e3ae9484083d505b8a /src/lib/Bcfg2/Options/Parser.py | |
parent | 9f53069e37e319959f3c30266b8de16494a9930c (diff) | |
download | bcfg2-b2a5bacaac8e94f35c4c6eb86642ba978748777b.tar.gz bcfg2-b2a5bacaac8e94f35c4c6eb86642ba978748777b.tar.bz2 bcfg2-b2a5bacaac8e94f35c4c6eb86642ba978748777b.zip |
Add BCFG2_CONFIG_FILE environment variable (regression from 1.3)
Diffstat (limited to 'src/lib/Bcfg2/Options/Parser.py')
-rw-r--r-- | src/lib/Bcfg2/Options/Parser.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Options/Parser.py b/src/lib/Bcfg2/Options/Parser.py index 48f3c5056..677a69e4c 100644 --- a/src/lib/Bcfg2/Options/Parser.py +++ b/src/lib/Bcfg2/Options/Parser.py @@ -37,6 +37,7 @@ class Parser(argparse.ArgumentParser): #: Option for specifying the path to the Bcfg2 config file configfile = PathOption('-C', '--config', + env="BCFG2_CONFIG_FILE", help="Path to configuration file", default="/etc/bcfg2.conf") @@ -219,6 +220,7 @@ class Parser(argparse.ArgumentParser): _debug("Option parsing phase 1: Get and read main config file") bootstrap_parser = argparse.ArgumentParser(add_help=False) self.configfile.add_to_parser(bootstrap_parser) + self.configfile.default_from_config(self._cfp) bootstrap = bootstrap_parser.parse_known_args(args=self.argv)[0] # check whether the specified bcfg2.conf exists |