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 # force reversion of 10.4 memcache mistake
40 rm -f config/afsd.options.broken
41 echo '-memcache -afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' > config/afsd.options.broken
42 if cmp -s config/afsd.options.broken config/afsd.options ; then
43 rm -f config/afsd.options
45 rm -f config/afsd.options.broken
47 # if the user hasn't changed these settings, then they should just use the new
49 rm -f config/afsd.options.old
50 echo '-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' >config/afsd.options.old
51 if cmp -s config/afsd.options.old config/afsd.options ; then
52 rm -f config/afsd.options
54 rm -f config/afsd.options.old
56 if [ ! -f config/afs.conf -a -f config/afs.conf.sample ]; then
57 cp config/afs.conf.sample config/afs.conf
60 # testing case -- upgrading from pre 1.2.7, but .last file exists.
61 # merge the .save and .last....
62 if [ ! -f CellServDB -a -f CellServDB.save -a -f CellServDB.master.last ]; then
63 cp CellServDB.save CellServDB
66 # upgrading between 2 post-1.2.7 releases (or the testing case)
67 if [ -f CellServDB.master.last ]; then
68 if cmp -s CellServDB.master.last CellServDB.master ; then
69 echo No CellServDB updates
74 # the local changes were included in the update
75 if [ -z "$done" -a -f CellServDB ]; then
76 if cmp -s CellServDB CellServDB.master ; then
77 echo CellServDB is up to date.
78 cp CellServDB.master CellServDB.master.last
79 if [ ! -f CellServDB ]; then
80 cp CellServDB.master CellServDB
86 if [ -z "$done" ]; then
87 # there are local changes to be merged
88 if [ -f CellServDB -a -f CellServDB.master.last ]; then
89 echo Merging CellServDB entries....
90 perl $1/Contents/Resources/csrvdbmerge.pl
93 # this is a new install, or an upgrade from pre-1.2.7
94 echo "Installing new CellServDB"
95 cp CellServDB.master CellServDB.master.last
96 if [ ! -f CellServDB ]; then
97 cp CellServDB.master CellServDB
102 if [ $majorvers -ge 7 ]; then
103 # make config/settings.plist if it doesn't exist
104 if [ ! -e config/settings.plist -a -e config/settings.plist.orig ]; then
105 cp config/settings.plist.orig config/settings.plist
107 elif [ -e config/afssettings ]; then
108 # turn off execution of afssettings
109 chmod a-x config/afssettings