From 76a7c2008a57a8f67f367b580c719d008cf3091f Mon Sep 17 00:00:00 2001 From: Will Woods Date: Mon, 8 Aug 2011 19:03:53 -0400 Subject: [PATCH] rb.postinstall(): don't allow configdir override Since the templates need to match the contents of the configdir, it doesn't really make sense to allow configdir to be different from templatedir. --- src/pylorax/__init__.py | 2 +- src/pylorax/treebuilder.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 4addb3d9..bbb0d4dd 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -197,7 +197,7 @@ class Lorax(BaseLoraxClass): fobj.write("{0}\n".format(fname)) logger.info("doing post-install configuration") - rb.postinstall(configdir=joinpaths(templatedir,"config_files")) + rb.postinstall() # write .discinfo discinfo = DiscInfo(self.product.release, self.arch.basearch) diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py index 8a694b77..2aa70bfb 100644 --- a/src/pylorax/treebuilder.py +++ b/src/pylorax/treebuilder.py @@ -80,9 +80,10 @@ class RuntimeBuilder(object): '''Install packages and do initial setup with runtime-install.tmpl''' self._runner.run("runtime-install.tmpl") - def postinstall(self, configdir="/usr/share/lorax/config_files"): + def postinstall(self): '''Do some post-install setup work with runtime-postinstall.tmpl''' # copy configdir into runtime root beforehand + configdir = joinpaths(self._runner.templatedir,"config_files") configdir_path = "tmp/config_files" fullpath = joinpaths(self.vars.root, configdir_path) if os.path.exists(fullpath):