Index: [Article Count Order] [Thread]

Date:  Tue, 29 Jan 2008 14:29:35 +0100
From:  Jes Kasper Klittum <jes (at mark) enavn.com>
Subject:  [coba-e:11830] Re: Setting email alias fails
To:  coba-e (at mark) bluequartz.org
Message-Id:  <479F2A3F.8020800 (at mark) enavn.com>
In-Reply-To:  <AAAC4D4C-AF51-4BCD-93C3-058AB86DC114 (at mark) iweb.dk>
References:  <479F03C0.6040908 (at mark) enavn.com> <AAAC4D4C-AF51-4BCD-93C3-058AB86DC114 (at mark) iweb.dk>
X-Mail-Count: 11830

Hello René,

René MÍsted skrev:

> Hi Jes
> This will check for alias on at specific site:
> #!/bin/bash
> 
> for i in $(grep $1 /usr/sausalito/codb/objects/*/.site | cut -d"." -f1); do
>     if [ -e $i/.alias]
>     then
>         grep -l $2  $i/.alias
>     fi
> done
> 
> #### SCRIPT END ###
> 
> Usage: ./script site271 info
> 
> Will return '/usr/sausalito/codb/objects/83/.alias'

Great - that did the trick ! I had to modify the script though, as it 
generated to much data for grep to handle. I changed it to:

#!/bin/sh

cd /usr/sausalito/codb/objects

for a in $(grep $1 ./*/.site | cut -d"." -f1-2); do
   if [ -e $a/.alias ] ; then
     grep -l info $a.alias
   fi
done

I then got the right answer and I was able to locate the alias object that was 
not connected to anything.

sh alias.sh site271 info
./5811/.alias

I then ran:

/usr/sausalito/bin/cceclient
100 CSCP/0.80
200 READY
get 5811
102 DATA NAMESPACE = ""
102 DATA CLASSVER = "1.0"
102 DATA build_maps = "1"
102 DATA CLASS = "EmailAlias"
102 DATA action = "xxx"
102 DATA alias = "info"
102 DATA site = "site271"
102 DATA OID = "5811"
102 DATA fqdn = "www.xxx.dk"
102 DATA local_alias = "0"
201 OK
destroy 5811
201 OK

Now all is fine and dandy. Thank you, René, for pointing me in the right 
direction. :)

-- 
Best regards,

Jes Kasper Klittum

enavn ApS [ Administration ]
Ringstedgade 11 A
4700 NëÔtved
-------------
enavn ApS [ Datacenter ]
Århusgade 88
2100 KÃenhavn ŽØ


Tel.: +45 88205000
Fax:  +45 88205010
support (at mark) enavn.dk

	

11830_2.x-vcard (attatchment)(tag is disabled)