[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dealing with multiple domains
From: |
Mark . Burgess |
Subject: |
Re: dealing with multiple domains |
Date: |
Mon, 10 Feb 2003 22:01:56 +0100 (MET) |
Domains are usually bounded by IP address ranges. That is one way.
M
On 10 Feb, Luke A. Kanies wrote:
> Hi all,
>
> How are people dealing with multiple domains in cfengine? I obviously
> can't just set it in the file, since it changes per-host, and I definitely
> don't want to have to configure lists in cfengine as to which machine is
> in which domain; I've already got that information stored on the machine,
> so I want cfengine to discover it.
>
> I didn't realize it, but I have not set the domain names up on all my
> systems except in /etc/resolv.conf, so I can't just call /bin/domainname.
> I figured I could pretty easily just call 'domainname', see if it's set,
> and if not, pull the domain out of /etc/resolv.conf and set everything up
> appropriately:
>
> control:
>
> Access = ( root ) # Only root should run this
>
> tmpdomain = ( ExecResult(/bin/domainname) )
>
> groups:
> domainset = ( IsDefined(tmpdomain) )
>
> control:
> actionsequence = ( shellcommands.echodomain )
> !domainset::
> actionsequence = ( shellcommands.setdomain )
>
> shellcommands:
> echodomain::
> "/bin/echo [$$] --${tmpdomain}--"
> setdomain::
> "/usr/local/scripts/setdomain"
>
> # okay, everything back to normal...
> # all that, just to figure out which domain we're in
> control:
> domain = ( ${tmpdomain} )
>
>
> Except this doesn't work. 'domainset' always gets defined, no matter what
> I do, apparently, and the shellcommand to echo the domain doesn't actually
> echo anything; in fact, the line echoed ends after the first two '-'
> characters; I should get '----' but I get '--'.
>
> Does anyone else use multiple domains? How? I really want cfengine to
> just be able to discover which domain my hosts are in, rather than me
> having to set it, but it seems to be quite difficult.
>
> Thanks,
> Luke
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272 Email: Mark.Burgess@iu.hio.no
Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- dealing with multiple domains, Luke A. Kanies, 2003/02/10
- Re: dealing with multiple domains,
Mark . Burgess <=
- Re: dealing with multiple domains, Chris Edillon, 2003/02/10
- Re: dealing with multiple domains, Nate Campi, 2003/02/10
- Re: dealing with multiple domains, Chris Edillon, 2003/02/10
- Re: dealing with multiple domains, Chris Edillon, 2003/02/10
- Re: dealing with multiple domains, Mark . Burgess, 2003/02/10
- Re: dealing with multiple domains, Luke A. Kanies, 2003/02/11
- Re: dealing with multiple domains, Marion Hakanson, 2003/02/11
- Re: dealing with multiple domains, Chris Edillon, 2003/02/11
- Re: dealing with multiple domains, Mark . Burgess, 2003/02/10
- Re: dealing with multiple domains, Andrew Stribblehill, 2003/02/11