Jeff Schroeder wrote:
> On Tue, May 19, 2009 at 8:54 AM, Michael DeHaan <[email protected]> wrote:
>   
>> I'd like to increase the number of interesting snippets we ship with
>> cobbler to make doing complex things with kickstart easier.
>>
>> I think things like "keep_ssh_host_keys" and the network config ones
>> were really clever, and we probably have more useful ideas in everyone's
>> kickstarts that we can build a better community around sharing.
>>
>> If you have any clever snippets you are using that are suitable for a
>> wider audience, or ideas for some, post them up and/or let's talk about
>> them here.
>>
>> These can be things for setting up specific applications, different
>> options for disk configuration, and so forth.
>>
>> I forsee having each snippet start with a nice comment block in the long
>> run so everyone can understand what they do and what variables
>> (--ksmeta) they employ.
>>     
>
>
> Here is a fairly obvious one I use for testing on new servers that
> works like a champ if you use redhat/fedora based distributions. It
> seems fine on generic (sd*), hp (cciss*), and xen (xvd*) servers. I
> don't claim attribution for the xen part and, lvm is the devil:
>
> #raw
> if list-harddrives | grep -q sda; then
>     cat << EOF >> /tmp/partinfo.inc
>         part swap --size=8192 --ondisk=sda
>         part /boot --size=256 --fstype ext2 --ondisk=sda
>         part / --fstype ext3 --size=0 --grow --ondisk=sda
> EOF
> elif list-harddrives | grep -q cciss; then
>     cat << EOF >> /tmp/partinfo.inc
>         part swap --size=8192 --ondisk=cciss/c0d0
>         part /boot --size=256 --fstype ext2 --ondisk=cciss/c0d0
>         part / --fstype ext3 --size=0 --grow --ondisk=cciss/c0d0
> EOF
> elif list-harddrives | grep -q xvda; then
>     cat << EOF >> /tmp/partinfo.inc
>         part swap --size=1024 --ondisk=xvda
>         part /boot --size=256 --fstype ext2 --ondisk=xvda
>         part / --fstype ext3 --size=0 --grow --ondisk=xvda
> EOF
> else
>     echo "Check your raid configuration on this host" | tee /dev/ttyS0
>     exit 255
> fi
> #end raw
>
> This requires a line towards the top like:
> %include /tmp/partinfo.inc
>
> It was a trick I stole from a previous job at Ticketmaster.
>
> The calls to "list-harddrives" could be replaced with a bit of
> heavylifting to make this distro agnostic but I'm not much interested
> in doing that. If someone else wants to take that project on more
> power to them.
>
>   

Not sure I follow ... you said this was for testing? Or does this add 
something beyond what autopart normally does?

--Michael
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to