summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--iutil.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c0e6f03d..ba35aed30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2007-05-01 Chris Lumens <clumens@redhat.com>
+ * iutil.py (execWithRedirect, execWithCapture): Make sure kickstart
+ scripts execute with the correct cwd (#237317).
+
* packages.py (doMigrateFilesystems): Write out the fstab after
migrate (#223215).
diff --git a/iutil.py b/iutil.py
index 479ec3f2b..39944b419 100644
--- a/iutil.py
+++ b/iutil.py
@@ -44,7 +44,7 @@ def execWithRedirect(command, argv, stdin = 0, stdout = 1, stderr = 2,
try:
proc = subprocess.Popen([command] + argv, stdin=stdin, stdout=stdout,
- stderr=stderr, preexec_fn=chroot)
+ stderr=stderr, preexec_fn=chroot, cwd=root)
ret = proc.wait()
except OSError, (errno, msg):
raise RuntimeError, "Error running " + command + ": " + msg
@@ -67,7 +67,7 @@ def execWithCapture(command, argv, stdin = 0, stderr = 2, root='/'):
pipe = subprocess.Popen([command] + argv, stdin=stdin,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
- preexec_fn=chroot)
+ preexec_fn=chroot, cwd=root)
except OSError, (errno, msg):
raise RuntimeError, "Error running " + command + ": " + msg