From c7b4ec9df5f58f754bbcb7ca661e97ce6b9e5344 Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Mon, 8 Nov 2010 16:50:59 +0100 Subject: [PATCH] Add implantisomd5 execution --- src/pylorax/__init__.py | 10 +++++++++- src/pylorax/constants.py | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 80a30a83..ed7d2749 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -22,7 +22,10 @@ # set up logging import logging -logging.basicConfig(level=logging.DEBUG, filename="pylorax.log", filemode="w") + +fh = logging.FileHandler(filename="pylorax.log", mode="w") +fh.setLevel(logging.DEBUG) +logging.getLogger("").addHandler(fh) sh = logging.StreamHandler() sh.setLevel(logging.INFO) @@ -687,6 +690,11 @@ class Lorax(BaseLoraxClass): p = subprocess.Popen(cmd, stdout=subprocess.PIPE) rc = p.wait() + # implant iso md5 + cmd = [self.lcmds.IMPLANTISOMD5, bootiso] + p = subprocess.Popen(cmd, stdout=subprocess.PIPE) + rc = p.wait() + return bootiso diff --git a/src/pylorax/constants.py b/src/pylorax/constants.py index 1031cdbe..956b0e98 100644 --- a/src/pylorax/constants.py +++ b/src/pylorax/constants.py @@ -36,6 +36,7 @@ class LoraxRequiredCommands(dict): self["DMSETUP"] = "dmsetup" self["FIND"] = "find" self["GCONFTOOL"] = "gconftool-2" + self["IMPLANTISOMD5"] = "implantisomd5" self["ISOHYBRID"] = "isohybrid" self["LDCONFIG"] = "ldconfig" self["LOCALEDEF"] = "localedef"