Gerrard Geldenhuis wrote:
Does anybody use the debug mode or now how to use it? I am not sure how to start it at will.
Is there a debug mode? There really should be if there isn't. After
all, this is a nearly universal problem, especially when first setting
up kickstart, when making changes, even with ordinarily working
configurations that suddenly develop problems with any of the
variables involved (network connectivity, web/ftp/nfs services, repos,
etc). I argued for a better built-in debug capability or framework in
this thread from August and September 06:
<https://www.redhat.com/archives/kickstart-list/2006-September/msg00002.html>
My workaround for the lack of a native debug-ability is to execute the
pre and post scripts on tty3, use error-checking like you would in any
other scripting that you do, and open a shell on problems. (You can
also switch to tty2 if you need another commandline.) You can do
discovery/debugging in the actual pre/post environment, very possibly
learn how to fix your script, or work around some temporary external
issue, and when you exit from the shell, continue with the rest of the
pre/post script.
%post
chvt 3
exec < /dev/tty3 > /dev/tty3 2>/dev/tty3
...some commands...
... some-command that deserves an error check...
if [ $? -ne 0 ]; then
echo 'some-command failed, check it out...'
sh
fi
...more commands
-Ed
_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list