error handling in %post (was: Re: trying to mount the dvd during post install.)

Coe, Colin C. Colin.Coe at woodside.com.au
Thu Aug 31 03:51:55 UTC 2006


Because the INSTALLER kernel is different to the INSTALLED kernel.  Its
compiled with different options (especially evident under EL4) and it
has different modules.  chroot ain't everything...

CC

-----Original Message-----
From: kickstart-list-bounces at redhat.com
[mailto:kickstart-list-bounces at redhat.com] On Behalf Of Edward F. Brown
Sent: Thursday, 31 August 2006 11:20 AM
To: Discussion list about Kickstart
Subject: RE: error handling in %post (was: Re: trying to mount the dvd
during post install.)


And WHY is having a "minimal %post section" a good thing?  Why not run
the
commands in ks_post.sh in ks?



On Wed, August 30, 2006 5:36 pm, Coe, Colin C. wrote:
>
> We have a minimal %post section that only copies our script ks_post.sh
> to /var/tmp and inserts 'sh /var/tmp/ks_post.sh' into
/etc/rc.d/rc.local
> with a clean up after it has run.
>
> As far as debugging goes, whats wrong with:
> %post
> set -x
> cmd1 &&
> cmd2 &&
> cmd3 &&
> cmd4 ||
> fixit
>
> ???
>
> All the debugging goes to vt3.
>
> CC
>
> -----Original Message-----
> From: kickstart-list-bounces at redhat.com
> [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Ed Brown
> Sent: Thursday, 31 August 2006 7:32 AM
> To: Discussion list about Kickstart
> Subject: error handling in %post (was: Re: trying to mount the dvd
> during post install.)
>
>
> Lambert Tran wrote:
>>
>> The trick at time was how to know the installation CD was actually is
>> /tmp/cdrom... (your may be /tmp/dvd). To find out, we had a sleep 600
> at the
>> %post section, and went look around.
>
> %post (and %pre) scripts are versatile and powerful tools, so why does
> the kickstart environment have a reputation of being difficult to work
> in?  How many questions to this list revolve around figuring out how
> to determine what the heck is going on in %pre and %post scripts?  Who
> has chosen to do things with scripts that execute on firstboot, rather
> than try to get something done in %post?  How many of us resort to
> inserting sleeps or other tricks to buy time at a commandline to debug
> problems?  How hard would it be to provide a debug mode, where
> non-zero return codes for commands (either all commands, or possibly
> only for specially-indicated commands) results in seeing the command
> that failed, and the reason/output if any, followed by a shell prompt?
>   Would this be useful for anyone here?  (Is this the wrong list,
> should it be posted to anaconda-devel instead (or also)?)
>
> -Ed?
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>

_______________________________________________
Kickstart-list mailing list
Kickstart-list at redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list




More information about the Kickstart-list mailing list