[PATCH] Print an error when the kickstart file is missing

Brian C. Lane bcl at redhat.com
Fri Dec 5 22:26:36 UTC 2014


If --kickstart has been passed we should make sure it actually exists.
If we don't the installation tries to continue but gets confused because
automatedInstall has been set.
---
 anaconda | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/anaconda b/anaconda
index 6707e33..70ff3fc 100755
--- a/anaconda
+++ b/anaconda
@@ -1049,6 +1049,11 @@ if __name__ == "__main__":
     # shipped with the installation media.
     ksdata = None
     if opts.ksfile and not opts.liveinst:
+        if not os.path.exists(opts.ksfile):
+            stdoutLog.error("Kickstart file %s is missing.", opts.ksfile)
+            iutil.ipmi_report(constants.IPMI_ABORTED)
+            sys.exit(1)
+
         flags.automatedInstall = True
         flags.eject = False
         ksFiles = [opts.ksfile]
-- 
1.9.3



More information about the anaconda-patches mailing list