Mailinglist Archive: opensuse-autoinstall (36 mails)
| < Previous | Next > |
Re: [opensuse-autoinstall] Added kernel boot options from autoyast control file
- From: Mike Marion <mmarion@xxxxxxxxxxxx>
- Date: Mon, 1 Oct 2007 12:48:52 -0700
- Message-id: <20071001194851.GD30641@xxxxxxxxxxxxxxxxxxxxxx>
On Mon, Oct 01, 2007 at 04:23:55PM +0200, Dag Wieers wrote:
> I would like to have an else-fallback. Or have a rule match everything
> except ^000c29. And I know you can play with <continue> to stop
> processing, but that is not an option in a complex environment.
What pops into my head is using a custom script. Basically do a short
shell script that if something like ifconfig sees the mac addres, echo
vmware, else echo your default.. something like:
<rule>
<custom1>
<script>
<![CDATA[
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
if [ -n "`ifconfig | awk '/HWaddr/{print $NF}' | egrep -i '^00:0C:29'`"
]
then
echo vmware
else
echo default
fi
]]>
</script>
<match>*</match>
<match_type>exact</match_type>
</custom1>
</rule>
later.. your arch match can do..
<profile>@custom1@-@arch@.xml</profile>
I think that would work.. and AFAIK you can use multiple variables like
that.
I get which disk profile to use for our image based on passed
profile=profile_name using a custom script this way. We only use one
variable mixed in another match rule.
--
Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com
Roz: "Physical contact extends our lives."
Frasier: "Well then, you'll outlive Styrofoam."
-- Frasier
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
> I would like to have an else-fallback. Or have a rule match everything
> except ^000c29. And I know you can play with <continue> to stop
> processing, but that is not an option in a complex environment.
What pops into my head is using a custom script. Basically do a short
shell script that if something like ifconfig sees the mac addres, echo
vmware, else echo your default.. something like:
<rule>
<custom1>
<script>
<![CDATA[
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
if [ -n "`ifconfig | awk '/HWaddr/{print $NF}' | egrep -i '^00:0C:29'`"
]
then
echo vmware
else
echo default
fi
]]>
</script>
<match>*</match>
<match_type>exact</match_type>
</custom1>
</rule>
later.. your arch match can do..
<profile>@custom1@-@arch@.xml</profile>
I think that would work.. and AFAIK you can use multiple variables like
that.
I get which disk profile to use for our image based on passed
profile=profile_name using a custom script this way. We only use one
variable mixed in another match rule.
--
Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com
Roz: "Physical contact extends our lives."
Frasier: "Well then, you'll outlive Styrofoam."
-- Frasier
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
| < Previous | Next > |