From b2a5bacaac8e94f35c4c6eb86642ba978748777b Mon Sep 17 00:00:00 2001 From: Michael Fenn Date: Mon, 7 Apr 2014 18:52:31 -0400 Subject: Add BCFG2_CONFIG_FILE environment variable (regression from 1.3) --- src/lib/Bcfg2/Options/Parser.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib/Bcfg2') 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 -- cgit v1.2.3-1-g7c22