[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: %post --name



> Maybe you missed the subtlety here.  As far as anaconda is concerned,
> %pre is one script.  %post is one script.  It starts a shell depending
> on what you defined as the script shell and executes the content.  The
> return result from that content is what is used to determine if there
> was a failure or not.
> 
> Your one script happens to call out to many other scripts.  At this
> time it's out of the hands of anaconda and into the hands of the
> interpreter, which is why the onus is on your script to correctly log
> or flag the status of each of those called scripts as the interpreter
> isn't necessarily going to do that for you.

Just to clarify then, multiple %pre/%post delimiters are combined into one script, or are they all called from one script?

My Kickstart file is littered with %post/%pre scripts.  Just for this case, supposed they look like this.

%post --interpreter /usr/bin/python --log=python.log
print "Hello World"

%post --interpreter /usr/bin/pytyon --log=python2.log

%post --interpreter /bin/sh --log=sh.log
echo "Hello World"

%post --interpreter /usr/bin/perl --log perl.log
print "Hello World\n";


All of these %post sections end up in one script?  

It looks like the class AnacondaKSScript represents one script, and it is then executed.  The output is redirected to a log file if --log is passed.  (This is a very useful option by the way, and I am glad it is in the newer version of Anaconda.)  Sorry to be so pestering, but I am still missing the "one" script thing.  


Christopher





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]