2 DAEMON=/private/var/db/openafs/etc/launchafs.sh
3 DAEMON_LAUNCHD_SCRIPT=/Library/LaunchDaemons/org.openafs.filesystems.afs.plist
4 DAEMON_UP=$(ps -ef | grep "$DAEMON_NAME" | grep -v grep | wc -l)
5 PREFERENCE_PANE=/Library/PreferencePanes/OpenAFS.prefPane
8 # only do these checks if we're upgrading from a pre-1.2.7
9 if [ -f CellServDB -a ! -f CellServDB.master ]; then
10 CK=`md5 CellServDB | awk '{ print $4 }'`
11 if grep -q $CK $1/Contents/Resources/CellServDB.list; then
12 # it matched one of our previously released files
13 echo Unmodified CellServDB -- not preserving
16 if [ ! -f CellServDB.master.last ]; then
17 echo Modified CellServDB -- saving as /var/db/openafs/etc/CellServDB.save
18 echo Please re-merge it manually -- this will not be required for future upgrades
20 cp CellServDB CellServDB.save
23 if [ -f config/afsd.options -a -f config/afsd.options.sample ]; then
24 if cmp -s config/afsd.options config/afs.options.sample; then
25 echo Removing no-longer needed afsd.options file
26 rm -f config/afsd.options
30 if [ -f /Library/StartupItems/OpenAFS/OpenAFS ]; then
31 /Library/StartupItems/OpenAFS/OpenAFS stop
33 if [ -f /Library/LaunchDaemons/org.openafs.filesystems.afs.plist ]; then
34 if ps ax | grep -v grep | grep $DAEMON > /dev/null
36 launchctl stop org.openafs.filesystems.afs
38 echo "$DAEMON is not running"
41 launchctl unload -w $DAEMON_LAUNCHD_SCRIPT
45 if [ -d /Library/PreferencePanes/OpenAFS.prefPane ]; then
46 rm -R /Library/PreferencePanes/OpenAFS.prefPane