On Tue, 16 Aug 2005, Baker, Darryl wrote: > My problem is that the machines have no other differences than a new domain. > Same IP ranges, etc..
I've taken a few different approaches to solving this problem, but they nearly all revolve around storing the domain somehow externally and then using an ExecResult to get the domain. A simple approach is to make sure that all hosts have the domain name set such that '/bin/domainname' returns the appropriate value: control: domain = ( ExecResult(/bin/domainname) ) Or, extract it from /etc/resolv.conf: control: domain = ExecResult(/bin/awk '/domain/ {print $2}' /etc/resolv.conf) ) I've gotten much longer and more complicated inline perl in there, too, that searches through /bin/domainname and then /etc/resolv.conf and then /etc/hosts and then failing or whatever. As is often the case, it's easier to make sure your system is correctly configured to easily return the right answer and then have cfengine run a shorter command to get that answer. -- It's not to control, but to protect the citizens of Singapore. In our society, you can state your views, but they have to be correct. -- Ernie Hai, co-ordinator of the Singapore Government Internet Project --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://config.sage.org _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine