RE: Using variables in kickstart file

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

 



You cannot use variables in the command section (I wish you could), only
in %pre and %post.  SO, you write the line you need for your network (or
disk, timezone, whatever) and you use %include which IS available to you
in the command section.

Does that clarify it? 

-----Original Message-----
From: kickstart-list-bounces@xxxxxxxxxx
[mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Gabrie
Sent: Wednesday, July 18, 2007 2:43 PM
To: Discussion list about Kickstart
Subject: Re: Using variables in kickstart file

On 7/18/07, Michael DeHaan <mdehaan@xxxxxxxxxx> wrote:
> %pre and %post are essentially bash shell scripts, independent of the 
> other lines
>
> Here's a clever snippet (also originated from Chip) that illustrates 
> how to build part of your kickstart, on the fly, using %pre and
%include...
>
> # lots of stuff here...
> # ...
> # ....
> %include /tmp/partinfo
>
> %pre
> # Determine how many drives we have
> set \$(list-harddrives)
> let numd=\$#/2
> d1=\$1
> d2=\$3
>
> cat << EOF >> /tmp/partinfo
> part / --fstype ext3 --size=1024 --grow --ondisk=\$d1 --asprimary part

> swap --size=1024 --ondisk=\$d1 --asprimary #EOF
>
> In the above example, the pre script runs first, and generates a file 
> in /tmp.  That file is then inserted into the kickstart, containing 
> instructions for drive setup.
> The same thing can be done in your case.

Sorry, I see what you want to explain, but I don't get the syntax.....
because I don't understand when it is written and when read.

Don't get how the files work together....

Gabrie

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


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux