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 the installer plugin generated ThisCell and/or CellAlias
36 # files, copy them in here
37 tmpthiscell
=/private
/tmp
/org.OpenAFS.Install.ThisCell.
$USER
38 tmpcellalias
=/private
/tmp
/org.OpenAFS.Install.CellAlias.
$USER
39 if [ -f $tmpthiscell ]; then
40 cp $tmpthiscell ThisCell
43 if [ -f $tmpcellalias ]; then
44 cp $tmpcellalias CellAlias
48 if [ ! -f ThisCell
-a -f ThisCell.sample
]; then
49 cp ThisCell.sample ThisCell
52 # force reversion of 10.4 memcache mistake
53 rm -f config
/afsd.options.broken
54 echo '-memcache -afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' > config
/afsd.options.broken
55 if cmp -s config
/afsd.options.broken config
/afsd.options
; then
56 rm -f config
/afsd.options
58 rm -f config
/afsd.options.broken
60 # if the user hasn't changed these settings, then they should just use the new
62 rm -f config
/afsd.options.old
63 echo '-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' >config
/afsd.options.old
64 if cmp -s config
/afsd.options.old config
/afsd.options
; then
65 rm -f config
/afsd.options
67 rm -f config
/afsd.options.old
69 if [ ! -f config
/afs.conf
-a -f config
/afs.conf.sample
]; then
70 cp config
/afs.conf.sample config
/afs.conf
73 # testing case -- upgrading from pre 1.2.7, but .last file exists.
74 # merge the .save and .last....
75 if [ ! -f CellServDB
-a -f CellServDB.save
-a -f CellServDB.master.last
]; then
76 cp CellServDB.save CellServDB
79 # upgrading between 2 post-1.2.7 releases (or the testing case)
80 if [ -f CellServDB.master.last
]; then
81 if cmp -s CellServDB.master.last CellServDB.master
; then
82 echo No CellServDB updates
87 # the local changes were included in the update
88 if [ -z "$done" -a -f CellServDB
]; then
89 if cmp -s CellServDB CellServDB.master
; then
90 echo CellServDB is up to
date.
91 cp CellServDB.master CellServDB.master.last
92 if [ ! -f CellServDB
]; then
93 cp CellServDB.master CellServDB
99 if [ -z "$done" ]; then
100 # there are local changes to be merged
101 if [ -f CellServDB
-a -f CellServDB.master.last
]; then
102 echo Merging CellServDB entries....
103 perl
$1/Contents
/Resources
/csrvdbmerge.pl
106 # this is a new install, or an upgrade from pre-1.2.7
107 echo "Installing new CellServDB"
108 cp CellServDB.master CellServDB.master.last
109 if [ ! -f CellServDB
]; then
110 cp CellServDB.master CellServDB
115 if [ $majorvers -ge 7 ]; then
116 # make config/settings.plist if it doesn't exist
117 if [ ! -e config
/settings.plist
-a -e config
/settings.plist.orig
]; then
118 cp config
/settings.plist.orig config
/settings.plist
120 /usr
/libexec
/PlistBuddy
-c "Add :Darwin:All:FSEvents bool" config
/settings.plist
&& /usr
/libexec
/PlistBuddy
-c "Set :Darwin:All:FSEvents true" config
/settings.plist
122 elif [ -e config
/afssettings
]; then
123 # turn off execution of afssettings
124 chmod a-x config
/afssettings
127 # properly, we should acquire a certificate from a real CA and ship
128 # signed binaries. for now, make Application Firewall (Security prefs pane)
129 # happy like this. See TN2206
130 if [ $majorvers -lt 14 ]; then
131 if [ -f /usr
/bin
/codesign
]; then
132 codesign
-s - /usr
/sbin
/afsd
136 #here we should run tools which configure the client, and then if it's enabled:
137 #start the new launchd daemon
138 launchctl load
-w /Library
/LaunchDaemons
/org.openafs.filesystems.afs.plist