On 4/21/05, Christian.Rohrmeier@xxxxxxxxxxx <Christian.Rohrmeier@xxxxxxxxxxx> 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
Attachment:
ks.cfg
Description: Binary data