Kickstart %include directive and %pre script issues

Martin Høy marhoy at gmail.com
Thu Apr 21 14:35:23 UTC 2005


On 4/21/05, Christian.Rohrmeier at schering.de
<Christian.Rohrmeier at schering.de> wrote:
> Hello Dear Kickstarters,
> 
> I'm running RHEL 2.1, 3, and 4, all of which need to be served by the
> kickstart script in question.
> 
> I have found a problem with the "%include" directive when including a file
> that is created by the %pre script.
> 
> What I want to do: dynamic disk partitioning. A great example of this can
> be found on page 56 of the RHEL 3 System Administration Guide. The idea is,
> in your %pre script you check out the disk situation, or ask the user
> something, and write the apropriate kickstart partitioning commands (as
> they would normally be found in the commands section of the kickstart
> script) into a file. This file was already included (via the %include
> directive) in the commands section of the kickstart file.
> 
> And thats the catch: while anaconda parses the kickstart script, it
> encounters the %include before it executes the the %pre script, and it dies
> a horrible death, spewing python errors, because it can't get to those
> precious "part" commands.

I'm doing exactly that, and it works. The %pre-script checks the present
partition layout, and decides wether it will re-use the existing partitions
or create new ones. See the attached ks.cfg.

Sorry about the mixed english/norwegian in the script. We're just - norwegian.


Regards,

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ks.cfg
Type: application/octet-stream
Size: 5913 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20050421/21448f38/attachment.obj>


More information about the Kickstart-list mailing list