Is there a way to make a RedHat kickstart installation exit during the %pre% section? I have a condition I'm checking, and if it's true, I'd like the installation to not continue. I have tried using the "exit" and "init" commands, but all I can get it to do is to exit out of the %pre% section, but it still continues with the installation. Is there a different command, or completely different method, of forcing kickstart to exit before it starts making any changes to the system?
Redhat – How to make kickstart exit
kickstartredhat
Best Answer
This should accomplish what you're looking for:
%pre --erroronfail
If the pre-installation script fails, this option will cause an error dialog to be displayed and will halt installation. The error message will direct you to where the cause of the failure is logged.
http://fedoraproject.org/wiki/Anaconda/Kickstart#Chapter_4._Pre-installation_Script