[rhel7/master] Make sure post script directory exists (#1080396)
Brian C. Lane
bcl at redhat.com
Wed Dec 3 00:06:47 UTC 2014
In some cases the full path for the post script may not exist (eg.
liveimg without a /tmp) so make sure it is there before writing the
script to it.
Related: rhbz#1080396
---
pyanaconda/kickstart.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 4122c02..ec21881 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -95,6 +95,9 @@ class AnacondaKSScript(KSScript):
else:
scriptRoot = "/"
+ if not os.path.exists(scriptRoot + "/tmp"):
+ os.makedirs(scriptRoot + "/tmp")
+
(fd, path) = tempfile.mkstemp("", "ks-script-", scriptRoot + "/tmp")
os.write(fd, self.script)
--
1.9.3
More information about the anaconda-patches
mailing list