Hi,
has anybody an examples rules.xml that uses custom1-5 rules?
We want to determine the machine specific configuration
(hostname, IP address settings) via rules.
According to rules.dtd such a rule could look like this
<rule>
<custom1>
<script>/path/to/some/script.sh</script>
<match>machine1</match>
equal
</custom>
<result>
<profile>machine1.xml</profile>
<continue config:type="boolean">false</continue>
</result>
</rule>
Is it correct that <script> contains a script path or does it contain
the script body like the following?
<rule>
<custom1>
<script>
<![CDATA[
#!/bin/sh
# Try to determine value of boot parameter
$machine=$(cat /proc/cmdline | grep "name=")
echo $machine
]]>
</script>
<match>machine1</match>
equal
</custom>
<result>
<profile>machine1.xml</profile>
<continue config:type="boolean">false</continue>
</result>
</rule>
Regards,
Stefan Voss