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 if [ ! -f ThisCell -a -f ThisCell.sample ]; then
36 cp ThisCell.sample ThisCell
39 if [ ! -f config/afsd.options -a -f config/afsd.options.sample ]; then
40 cp config/afsd.options.sample config/afsd.options
43 # testing case -- upgrading from pre 1.2.7, but .last file exists.
44 # merge the .save and .last....
45 if [ ! -f CellServDB -a -f CellServDB.save -a -f CellServDB.master.last ]; then
46 cp CellServDB.save CellServDB
49 # upgrading between 2 post-1.2.7 releases (or the testing case)
50 if [ -f CellServDB.master.last ]; then
51 if cmp -s CellServDB.master.last CellServDB.master ; then
52 echo No CellServDB updates
57 # the local changes were included in the update
58 if [ -z "$done" -a -f CellServDB ]; then
59 if cmp -s CellServDB CellServDB.master ; then
60 echo CellServDB is up to date.
61 cp CellServDB.master CellServDB.master.last
66 if [ -z "$done" ]; then
67 # there are local changes to be merged
68 if [ -f CellServDB -a -f CellServDB.master.last ]; then
69 echo Merging CellServDB entries....
70 perl $1/Contents/Resources/csrvdbmerge.pl
73 # this is a new install, or an upgrade from pre-1.2.7
74 echo "Installing new CellServDB"
75 cp CellServDB.master CellServDB.master.last
76 cp CellServDB.master CellServDB
80 if [ $majorvers -ge 7 ]; then
81 # make config/settings.plist if it doesn't exist
82 if [ ! -e config/settings.plist -a -e config/settings.plist.orig ]; then
83 cp config/settings.plist.orig config/settings.plist
85 elif [ -e config/afssettings ]; then
86 # turn off execution of afssettings
87 chmod a-x config/afssettings