Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / packaging / HP-UX / scripts / openafs-krn.checkremove
1 #!/bin/sh
2 ##############
3 # Subproduct: OPENAFS.Kernel
4 # Fileset: OPENAFS-KRN32 | OPENAFS-KRN64
5 # checkremove
6 # @(#) $Revision: 1.2
7 ##############
8 #
9 # (c) Copyright Hewlett-Packard Company, 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 UTILS=/usr/lbin/sw/control_utils
17 if [[ ! -f $UTILS ]]
18 then
19 print "ERROR: Cannot find the sh functions library $UTILS."
20 exit 1
21 fi
22
23 . $UTILS
24
25 if [[ $SW_SESSION_IS_KERNEL = "TRUE" ]]; then
26
27 # Test here for afs filesystems before removing
28 # Write stdout to a file
29 # We really aren't testing, this script is provided as an example
30
31 if [ -s /tmp/afsfilesystem ] ; then
32 echo "ERROR: AFS filesystems still exist on the system. In order to"
33 echo " remove the $FILESET fileset, you must remove the "
34 echo " afs filesystems and re-execute the swremove command."
35 exit $FAILURE
36 fi
37 exit $SUCCESS
38 fi
39