%include syntax and usage

Robert Denton robert at headsprout.com
Wed Sep 13 22:38:39 UTC 2006


Right, I see what you mean about the documentation.  I would love for  
one of the maintainers of kickstart to pipe in regarding how to use  
include in kickstart scripts.  Where does the "/path/to/file" need to  
live in order for the install to see it.  That is very confusing.

I have high hopes for this list so I am very encouraged to hear you  
speak well of it. I have been using my same kickstart script with  
only minor modifications accross several versions of redhat/fedora  
and I really like kickstart in general.  It is only now that I really  
want to take it to the next level, and I hope to make better use of  
its options, including %include f possible.

Anyone have any idea what /path/to/file means in terms of a lickstart  
include? The docs all just summarize include syntax as:

%include /path/to/file

Robert Denton
Network Administrator
Headsprout
800.401.5062 x1305
www.headsprout.com

On Sep 13, 2006, at 1:00 PM, Shabazian, Chip wrote:

> Anaconda and kickstart aren't exactly known for their vast amounts of
> documentation.
>
> I had to figure out 80% of what we do in our builds via trial and  
> error.
> What I found to be the most useful was to put sleep 999999999  
> statements
> in the %pre and %post everywhere I wanted to try something different,
> then go to the Alt-F2 terminal bash prompt and poke around and try  
> stuff
> manually.  Once I got it to work manually, I would then incorporate it
> into the mainstream kickstart build that we use globally.
>
> All that said, I realize most people don't get to spend weeks fine
> tuning the kickstart process for their environment.  If the usefulness
> and numbers of servers you need to build justify it, then jump in and
> hack away.  If on the other hand, you are building a few dozen servers
> or less, it probably won't be worth it to go through the extensive
> process I did.
>
> This list is a great place to get help and ideas.  Very rarely do I  
> see
> a problem that someone on the list hasn't resolved, or can't point you
> to a solution.  It might not be the exact solution you want (such  
> as the
> one I gave you), but you can usually get something done that will
> accomplish what you need.
>
> The other solution that I am aware of, that could help you is server
> side generated kickstart files.  This is going to be much more  
> complex,
> and requires a cgi on the server to accept the request and generate  
> the
> kickstart file, either on the fly or after a subsequent reboot, but  
> this
> is another solution I have seen deployed successfully.
>
> Chip
>
> -----Original Message-----
> From: kickstart-list-bounces at redhat.com
> [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Robert Denton
> Sent: Wednesday, September 13, 2006 9:42 AM
> To: Discussion list about Kickstart
> Subject: Re: %include syntax and usage
>
> Hi Chip, thanks for the response!!  I didn't mean to disparage your
> comment at all.  I appreciate any and all suggestions. I understand  
> that
> the size of even the largest kickstart config file is trivial compared
> to the overall build but I was hoping to keep it short and neat  
> anyway.
> Are you aware of any thorough documentation discussing the include
> directive?  I cannot even find that, other than a few missives here  
> and
> there that state the syntax is:
>
> %include /path/to/file
>
> the /path/to/file is apparently a little trickier than it looks.
>
> Robert Denton
> Network Administrator
> Headsprout
> 800.401.5062 x1305
> www.headsprout.com
>
> On Sep 13, 2006, at 12:35 PM, Shabazian, Chip wrote:
>
>> Sorry, you didn't explain WHY you were doing it, you just asked for a
>> solution.
>>
>> My kickstart file also has a very large exclusion list, that is used
>> for all kickstarts.  I then include some packages back into the build
>> for certain builds based on the decisioning logic that is in the % 
>> pre.
>>
>> Yes, this is all stored in the kickstart file, but it allows me to  
>> use
>
>> one kickstart file to build thousands of distributed servers a year
>> with differing requirements.  At the end of the day, if the kickstart
>> file is huge, it's still very small compared to the number of  
>> packages
>
>> you will have to transfer across the wire, and it should have no
>> impact on how long it takes to build a box.
>>
>> Chip
>>
>>
>>
>> -----Original Message-----
>> From: kickstart-list-bounces at redhat.com
>> [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Robert Denton
>> Sent: Wednesday, September 13, 2006 9:07 AM
>> To: Discussion list about Kickstart
>> Subject: Re: %include syntax and usage
>>
>> Hm..  But if you build the list dynamically in the %pre section,  
>> isn't
>> this still in the kickstart config file?  I am trying to separate out
>> the packages because I have a long list of packages and package
>> exclusions.
>>
>> Robert Denton
>> Network Administrator
>> Headsprout
>> 800.401.5062 x1305
>> www.headsprout.com
>>
>> On Sep 13, 2006, at 12:02 PM, Shabazian, Chip wrote:
>>
>>>
>>> The way I do this is to create the file I want, along with the
>>> decisioning logic in %pre.
>>>
>>> Example
>>>
>>> if xxxxx ; then
>>> cat << EOF >> /tmp/pkg2include
>>> pkg1
>>> pkg2
>>> etc
>>> EOF
>>>
>>> Then in the %packages, I use
>>> %include /tmp/pkg2include
>>>
>>> I think I ran into problems when the file doesn't exist, so I added:
>>> touch /tmp/pkg2include
>>> at the end of the %pre so the file was there, even if it was empty.
>>>
>>> Chip
>>>
>>> -----Original Message-----
>>> From: kickstart-list-bounces at redhat.com
>>> [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Robert  
>>> Denton
>>> Sent: Wednesday, September 13, 2006 8:40 AM
>>> To: kickstart-list at redhat.com
>>> Subject: %include syntax and usage
>>>
>>> Hello all,
>>>
>>> I am hoping someone can help me with this.  I am trying to
>>> separate my
>>> %packages list into a different file using the %include directive.
>>> I am
>>> finding that no matter what I try, the install aborts due to not
>>> being
>>
>>> able to see the packages file.  Hhere si the set up:
>>>
>>> I build the linux computers via http, typing this at the boot  
>>> prompt:
>>>
>>> linux ks=http://10.10.10.52/ks.cfg
>>>
>>> This points the install to the kickstart config which is located  
>>> here
>>> on my webserver:
>>>
>>> /var/build/linux/ks.cfg
>>>
>>> Also in that directory is 'packages'
>>>
>>> /var/build/linux/packages
>>>
>>> In the kickstart file I have tried all of these and none have  
>>> worked:
>>>
>>> %include packages
>>> %include ./packages
>>> %include /var/build/linux/packages
>>> %include http://10.10.10.52/packages
>>>
>>> Could someone give me some pointers on the syntax?  Thanks!
>>>
>>>
>>> Robert Denton
>>> Network Administrator
>>> Headsprout
>>> 800.401.5062 x1305
>>> www.headsprout.com
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>> _______________________________________________
>> 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