diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 2dcf6d71..a2c26316 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -70,6 +70,7 @@ def __init__(self, myspec, addlargs): "compression_mode", "cxxflags", "decompressor_search_order", + "env", "fcflags", "fflags", "hostuse", @@ -1097,6 +1098,10 @@ def chroot_setup(self): shutil.copy(self.settings['envscript'], self.settings['chroot_path'] + '/tmp/envscript') + if "env" in self.settings: + with open(self.settings['chroot_path'] + '/tmp/envscript', "a+") as myf: + myf.write("export %s" % self.settings["env"]) + # Copy over /etc/hosts from the host in case there are any # specialties in there hosts_file = self.settings['chroot_path'] + '/etc/hosts'