Mailinglist Archive: opensuse-autoinstall (72 mails)
| < Previous | Next > |
Re: [opensuse-autoinstall] custom rules
- From: Frank Steiner <fsteiner-mail1@xxxxxxxxxxxxxx>
- Date: Tue, 12 Feb 2008 09:57:27 +0100
- Message-id: <47B15F77.40800@xxxxxxxxxxxxxx>
Mike Marion wrote
That would mean different pxelinux.cfg stuff for different hosts.
Ok, that gave me the idea. Of course I can do sth. like
"case $HOSTNAME in a|b|c) echo blabla"
in the custom script. reaching the same effect as your script, but by
listing the hostnames in the script/profile instead of a case distinction
on the kernel command line (that would be much more difficult in our setup).
Thanks for the hint!
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
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.
That would mean different pxelinux.cfg stuff for different hosts.
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
Ok, that gave me the idea. Of course I can do sth. like
"case $HOSTNAME in a|b|c) echo blabla"
in the custom script. reaching the same effect as your script, but by
listing the hostnames in the script/profile instead of a case distinction
on the kernel command line (that would be much more difficult in our setup).
Thanks for the hint!
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
| < Previous | Next > |