Setup PATH

Add /sbin and /usr/sbin to PATH, because when used with cron,
cron does not include it in PATH.
This commit is contained in:
Martin Gracik 2010-11-09 09:46:58 +01:00
parent e5ef6300c3
commit b1ce740a18

View File

@ -137,6 +137,10 @@ class Lorax(BaseLoraxClass):
if line and not line.startswith("#"):
self.output.ignore(line)
# XXX cron does not have sbin in PATH,
# so we have to add it ourselves
os.environ["PATH"] = "{0}:/sbin:/usr/sbin".format(os.environ["PATH"])
self._configured = True
def run(self, yb, product, version, release, variant="", bugurl="",