summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-05-01 15:06:48 +0000
committerChris Lumens <clumens@redhat.com>2007-05-01 15:06:48 +0000
commit50c953eb6e43a8e06e0b7b21507560f6ce0f5d17 (patch)
tree2b6594f293061ee15374f67055df8f7f2df6c7e9 /iutil.py
parent47c53032a7c990dbb8dcad0aba9eba9b9ec99ae6 (diff)
downloadanaconda-50c953eb6e43a8e06e0b7b21507560f6ce0f5d17.tar.gz
anaconda-50c953eb6e43a8e06e0b7b21507560f6ce0f5d17.tar.xz
anaconda-50c953eb6e43a8e06e0b7b21507560f6ce0f5d17.zip
Make sure kickstart scripts execute with the correct cwd (#237317).
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py4
1 files changed, 2 insertions, 2 deletions
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