Hi,
I played around with using variables like @bla@ in the result part of
a rule. I tried to do sth. like this:
1) whatever k_arch we match, use @k_arch@.xml as profile.
I could not do that because I could not reach that "whatever we match".
When I just remove the <match> element, AY seems to take this as "undefined"
and tries to match "undefined" against the value of the variable k_arch,
which fails.
However, if I need to match explicitely against e.g. "kernel-default",
then I don't need the @k_arch@ variable anymore. This would only make
sense if I don't now what exactly I matched against.
This would work only when using a custom script to detect the hostip
and then use a "range" match type. But for strings like k_arch I don't
know how to achieve this.
One would need sth. like "<match>*</match>" to match against anything,
or AY should take a missing match as "always succeed".
Or is there any other way to achieve this?
2) I tried to use a profile <hostname>.xml for whatever hostname we matched.
Since hostname contains the IP at the moment, I tried a custom script
like this:
<rule>
<custom1>
<script>
<![CDATA[
#!/bin/sh
export myhostname=`grep HOSTNAME /var/lib/dhcpcd/dhcpcd-eth0.info | sed 's/HOSTNAME=//g'`
echo -n undefined
]]>
</script>
<match>undefined</match>
participants (1)
-
Frank Steiner