Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / packaging / HP-UX / scripts / openafs-srv.postremove
1 #!/bin/sh
2 ##############
3 # Product: OPENAFS
4 # Fileset: OPENAFS.OPENAFS-SRV
5 # postremove
6 # @(#) $Revision$
7 ##############
8 #
9 # (c) Copyright 2003
10 #
11 ########
12
13 # The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT,
14 # SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils.
15
16 set -a
17 UTILS="/usr/lbin/sw/control_utils"
18 if [[ ! -f ${UTILS} ]]
19 then
20 echo "ERROR: Cannot find ${UTILS}"
21 exit 1
22 fi
23 . ${UTILS}
24
25 exitval=$SUCCESS # Anticipate success
26
27 ############################################################################
28
29 #
30 # After the removal of the server, we remove all the files and
31 # directories associated
32 # with the server (which was created with the bosserver)
33
34 RMDIRS="/usr/afs/db \
35 /usr/afs/local \
36 /usr/afs/etc/ThisCell \
37 /usr/afs/etc/CellServDB \
38 /usr/afs/logs"
39
40 for dir in $RMDIRS
41 do
42 if [[ -d $dir ]]; then
43 print "Removing directory $dir"
44 rm -fr $dir
45 fi
46 done
47
48 exit $exitval