2 # Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
3 if [ -d /afs -a ! -h /afs ]; then
6 majorvers=`uname -r | sed 's/\..*//'`
7 if [ $majorvers -ge 7 ]; then
8 # /Network is now readonly, so put AFS in /afs; make sure /afs is a directory
10 if [ -h /afs -o ! -d /afs ]; then
19 if [ ! -h /afs ]; then
20 ln -s /Network/afs /afs
24 cd /var/db/openafs/etc
26 if [ ! -f cacheinfo ]; then
27 cp cacheinfo.sample cacheinfo
30 if [ `grep /Network/afs cacheinfo` ]; then
31 cat cacheinfo |sed s#/Network/afs#/afs# > cacheinfo.new
32 mv cacheinfo.new cacheinfo
35 # testing case -- upgrading from pre 1.2.7, but .last file exists.
36 # merge the .save and .last....
37 if [ ! -f CellServDB -a -f CellServDB.save -a -f CellServDB.master.last ]; then
38 cp CellServDB.save CellServDB
41 # upgrading between 2 post-1.2.7 releases (or the testing case)
42 if [ -f CellServDB.master.last ]; then
43 if cmp -s CellServDB.master.last CellServDB.master ; then
44 echo No CellServDB updates
49 # the local changes were included in the update
50 if [ -z "$done" -a -f CellServDB ]; then
51 if cmp -s CellServDB CellServDB.master ; then
52 echo CellServDB is up to date.
53 cp CellServDB.master CellServDB.master.last
58 if [ -z "$done" ]; then
59 # there are local changes to be merged
60 if [ -f CellServDB -a -f CellServDB.master.last ]; then
61 echo Merging CellServDB entries....
62 perl $1/Contents/Resources/csrvdbmerge.pl
65 # this is a new install, or an upgrade from pre-1.2.7
66 echo "Installing new CellServDB"
67 cp CellServDB.master CellServDB.master.last
68 cp CellServDB.master CellServDB
72 if [ $majorvers -ge 7 ]; then
73 # make config/settings.plist if it doesn't exist
74 if [ ! -e config/settings.plist -a -e config/settings.plist.orig ]; then
75 cp config/settings.plist.orig config/settings.plist
77 elif [ -e config/afssettings ]; then
78 # turn off execution of afssettings
79 chmod a-x config/afssettings