On Mon, Feb 11, 2008 at 01:19:25PM +0100, Frank Steiner wrote:
But now I want to select one profile for 10 certain hostnames. How can
I do that in an elegant way?
If it's not too hard to do it at boot time, rather then trying to script
it to know specific hostnames, and then having to update the script
anytime that list changed, you could just add some keyword on the kernel
cmdline to trigger your special thing and do that.
Could do something like..
Add to cmdline: dospecial
Do something in script like:
<rule>
<custom1>
<script>
<![CDATA[
#!/bin/sh
if [ -n "`grep dospecial /proc/cmdline`" ]
then
echo special
else
. /var/lib/dhcpcd/dhcpcd-eth0.info
echo -n $HOSTNAME
fi
]]>
</script>
<match>*</match>
exact
</custom1>
<result>
<profile>profiles/part_@custom1@_keep.xml</profile>
<continue config:type="boolean">true</continue>
</result>
</rule>
Assuming that you wanted the same special profile file for all of the
matching hosts. Could also do a custom2 or append something onto
hostname for @custom1@ value.
We do come initial disk slicing profiles and such like this.. using a
profile=<profile> in cmdline. We also pass the hostname via
host=<hostname>. You can add what you want to cmdline as long as you
don't clash with any existing keywords of course.
And if you're on sles/sled10-sp1+ they included the kernel patches to
allow 2048 characters on cmdline vs the old 256 char default (which is a
lot shorter then you might think). I actually patched the same patch
into our sles9-sp3 installs because it was very helpful being able to
pass our long nfs mount paths for both autoyast= and install= on the
cmdline.
--
Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com
George: "You don't work in the rain? You're a mailman... Neither Rain, nor
sleet, nor sno-IT'S THE FIRST ONE!" ==> Seinfeld
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org