cellservdb-20061008
[openafs.git] / src / packaging / HP-UX / scripts / openafs.unconfigure
1 #!/bin/sh
2
3 echo "NOTE:    Executing unconfigure script."
4 #######
5 #
6 #  (c) Copyright Hewlett-Packard Company 1994
7 # @(#) OpenAFS unconfigure v1.2 4/22/03
8 ########
9
10     set -a
11     UTILS="/usr/lbin/sw/control_utils"
12     if [[ ! -f ${UTILS} ]]
13     then
14         echo "ERROR:   Cannot find ${UTILS}"
15         exit 1
16     fi
17     . ${UTILS}
18 #
19 # Anticipate SUCCESS
20 exitval=$SUCCESS
21  
22 ################################################
23 # Set the global PATH to include OPENAFS software
24 ROOT=/opt/afs/
25 mod_pathfile -d P ${ROOT}bin
26
27 if [[ $? = 2 ]]
28 then
29     echo "         $ROOT already removed from /etc/PATH."
30 else
31     echo "         ${ROOT}/bin removed from path"
32 fi
33
34 # Remove the startup/shutdown scripts from /sbin/init.d and /sbin/rc2.d
35 # Remove the configuration files inserted by the configure script
36
37 RMFILES="/usr/vice/etc/AFSlog \
38         /usr/vice/etc/CellServDB \
39         /usr/vice/etc/ThisCell \
40         /usr/vice/etc/cacheinfo \
41         /sbin/rc2.d/K800afs \
42         /sbin/rc2.d/S460afs \
43         /sbin/init.d/afs"
44
45 for file in $RMFILES
46 do
47   if [[ -f $file ]];then
48     print "Removing file $file"
49     rm $file
50   fi
51 done
52
53 exit $exitval