%post script for swapfile

James P lists.james at gmail.com
Wed Mar 15 21:32:19 UTC 2006


I'd also recommend using /bin/ash if you want to test drive any wierd or 
convoluted logic you're going to put into the %pre section.
/bin/bash works for testing %post stuff, but the %pre interpreter isn't 
a full-fledged bash shell, so you can't do fancy stuff like 
${parameter//pattern/string} like you can do in bash.
I'm not 100% sure if ash is even the interpreter used in %pre, but it's 
been a perfect simulator for me so far.

Also, if you don't want to sleep for an eternity, you could put 
something like this in %pre or %post:
exec < /dev/tty3 > /dev/tty3
chvt 3
echo "Press <Enter> to continue with installation."
read foo
chvt 1
......

Then you could go mess around in Alt-F2 for as long as you like; and 
just Alt-F3, <Enter> when you're ready to continue the build.

Shabazian, Chip wrote:

>When testing/debugging, I put a sleep 99999999999 in my %pre and %post.
>You can then go into the Alt-F2 shell and test whatever you want.  When
>it works the way you want, just kill the sleep process, and the build
>will continue.
>
>Chip 
>
>-----Original Message-----
>From: kickstart-list-bounces at redhat.com
>[mailto:kickstart-list-bounces at redhat.com] On Behalf Of Robert Citek
>Sent: Wednesday, March 15, 2006 1:00 PM
>To: Discussion list about Kickstart
>Subject: Re: %post script for swapfile
>
>
>On Mar 15, 2006, at 2:05 PM, Shabazian, Chip wrote:
>  
>
>>That should work just fine as is
>>    
>>
>
>Thanks, Chip.
>
>The reason I asked is because there doesn't seem to be any easy way to
>test/debug a %post script.  That is, the only way to test/debug is to
>run the entire install process again.  So, it's nice to know in advance
>that a post script should work.
>
>Regards,
>- Robert
>http://www.cwelug.org/downloads
>Help others get OpenSource software.  Distribute FLOSS for Windows,
>Linux, *BSD, and MacOS X with BitTorrent
>
>_______________________________________________
>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