[BlueOnyx:06537] Re: Fwd: Email user/alias problem
Greg Kuhnert
gkuhnert at compassnetworks.com.au
Sun Feb 20 16:18:54 -05 2011
Hi Dudi.
On 21/02/2011 7:51 AM, Dudi Goldenberg wrote:
>> There is a thread about this somewhere. Greg Khunert wrote oidfixer.sh
> Where can I get oidfixer.sh?
>
I actually like Steve's solution too - but for the sake of completeness,
here's the tool I wrote some time back. The actual name is oidlist.sh
Instructions:
1. Create the script and make it executable
2. Stop cced
service cced.init stop
3. Run the script
./oidlist.sh
The script will print out a list of objects based on the actual object
directories, and it will also print a copy of codb.oids which is what
CCE thinks are the used OID's. Both lists of OID numbers should be
identical.
If they are not, then copy the reported OID's into
/usr/sausalito/codb/codb.oids
4. Restart cced
service cced.init start
#!/bin/bash
LAST=-1
MIN=-1
for X in `ls/usr/sausalito/codb/objects/ | sort -n`
do
MYNEXT=$(( $LAST + 1 ))
if [ $MYNEXT -eq $X ]
then
LAST=$X
else
if [ $LAST -ge 1 ]
then
if [ $MIN -eq $LAST ]
then
echo -n $LAST,
else
echo -n $MIN-$LAST,
fi
fi
LAST=$X
MIN=$X
fi
done
if [ $MYNEXT -lt $X ]
then
echo -n $LAST
else
echo -n $MIN-$LAST
fi
echo ""
echo "/usr/sausalito/codb/codb.oids reports:"
cat /usr/sausalito/codb/codb.oids
echo ""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20110221/b1f7b3a4/attachment.html>
More information about the Blueonyx
mailing list