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
62 if [ ! -f CellServDB ]; then
63 cp CellServDB.master CellServDB
69 if [ -z "$done" ]; then
70 # there are local changes to be merged
71 if [ -f CellServDB -a -f CellServDB.master.last ]; then
72 echo Merging CellServDB entries....
73 perl $1/Contents/Resources/csrvdbmerge.pl
76 # this is a new install, or an upgrade from pre-1.2.7
77 echo "Installing new CellServDB"
78 cp CellServDB.master CellServDB.master.last
79 if [ ! -f CellServDB ]; then
80 cp CellServDB.master CellServDB
85 if [ $majorvers -ge 7 ]; then
86 # make config/settings.plist if it doesn't exist
87 if [ ! -e config/settings.plist -a -e config/settings.plist.orig ]; then
88 cp config/settings.plist.orig config/settings.plist
90 elif [ -e config/afssettings ]; then
91 # turn off execution of afssettings
92 chmod a-x config/afssettings
95 #here we should run tools which configure the client, and then if it's enabled:
96 /Library/StartupItems/OpenAFS/OpenAFS start