#!/bin/sh if [ -d /afs -a ! -h /afs ]; then rmdir /afs fi mkdir -p /Network/afs if [ ! -h /afs ]; then ln -s /Network/afs /afs fi cd /var/db/openafs/etc if [ ! -f cacheinfo ]; then cp cacheinfo.sample cacheinfo fi # testing case -- upgrading from pre 1.2.7, but .last file exists. # merge the .save and .last.... if [ ! -f CellServDB -a -f CellServDB.save -a -f CellServDB.master.last ]; then cp CellServDB.save CellServDB fi # upgrading between 2 post-1.2.7 releases (or the testing case) if [ -f CellServDB.master.last ]; then if cmp -s CellServDB.master.last CellServDB.master ; then echo No CellServDB updates done=1 fi fi # the local changes were included in the update if [ -z "$done" -a -f CellServDB ]; then if cmp -s CellServDB CellServDB.master ; then echo CellServDB is up to date. cp CellServDB.master CellServDB.master.last done=1 fi fi if [ -z "$done" ]; then # there are local changes to be merged if [ -f CellServDB -a -f CellServDB.master.last ]; then echo Merging CellServDB entries.... perl $1/Contents/Resources/csrvdbmerge.pl echo done else # this is a new install, or an upgrade from pre-1.2.7 echo "Installing new CellServDB" cp CellServDB.master CellServDB.master.last cp CellServDB.master CellServDB fi fi