Coda File System

RE: ip address instead of hostname

From: <>
Date: Fri, 24 Oct 2003 13:39:15 +0100
This applies only to server machines.
I got it working with a workaround which doesn't seem very elegant to me, anyway, it works.
I really do not depend on the hostnames, in my environment I never use them, I don't care at all about them, so never mind about this "brutal" approach.

# setting the hostname
hostname host1
# finding out host ip address
ip=`LANG="C" LC_ALL="C" ifconfig tun0 | grep 'inet addr:' | sed 's/.*inet addr:\([0-9.]*\).*/\1/'`
# necessary, otherwise I get the message "hostname not listed in /vice/db/servers" when starting codasrv --> exits
hostname $ip
# replace occurences of host1 with $ip
perl -pi.bak -e "s/host1/$ip/g" /vice/db/servers
perl -pi.bak -e "s/host1/$ip/g" /vice/db/scm
perl -pi.bak -e "s/host1/$ip/g" /vice/db/VSGDB
perl -pi.bak -e "s/host1/$ip/g" /vice/hostname
perl -pi.bak -e "s/host1/$ip/g" /vice/db/vicetab

> The only thing will be that you will have to access your realms as
>     'cd /coda/'

yes, works fine.
Thanks a lot.

Received on 2003-10-24 08:49:13