On 04/15/2015 10:04 AM, David Lee wrote:
The general issue. In the "%pre" section of the cobbler kickstart file we have a snippet whose purpose is to check a detail of the client machine and, if things are OK, set some variables and proceed as usual. This is the normal case.
But sometimes, particularly with new hardware types, we expect that check to fail; we then want things to stop and print a decent error message.
What would be much better is if that snippet itself could (a) produce error messages on the main screen and (b) cleanly halt.
Any thoughts? What have I missed?
This is not a Cobbler question, as snippet is simply included in the automatic installation file (eg kickstart), but that's ok.
Use --erroronfail (http://serverfault.com/questions/446428/how-to-make-kickstart-exit) and echo/return 1 in the snippet if your check fails.