Commit | Line | Data |
---|---|---|
805e021f CE |
1 | #!/bin/sh |
2 | ############## | |
3 | # Subproduct: OPENAFS.Kernel | |
4 | # Fileset: OPENAFS-KRN32 | OPENAFS-KRN64 | |
5 | # verify | |
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 | . $UTILS | |
23 | ||
24 | TEMP=/tmp/kern-verify.$$ | |
25 | ||
26 | trap "/usr/bin/rm -f $TEMP" HUP INT QUIT TERM ABRT EXIT | |
27 | ||
28 | kernel="$(get_kernel_path)" | |
29 | ||
30 | /usr/lbin/sysadm/get_sysfile ${kernel} >| $TEMP | |
31 | if [[ ! -s "$TEMP" ]] | |
32 | then | |
33 | print "ERROR: The get_sysfile tool failed on ${kernel}." | |
34 | exit $FAILURE | |
35 | fi | |
36 | ||
37 | for driver in afs | |
38 | do | |
39 | /usr/bin/grep "^${driver}\$" $TEMP >/dev/null 2>&1 | |
40 | if [[ $? -ne 0 ]] | |
41 | then | |
42 | print "WARNING: The \"${driver}\" functionality is not configured in the" | |
43 | print " kernel (${kernel})." | |
44 | print " The $FILESET fileset is not properly installed." | |
45 | exit $WARNING | |
46 | fi | |
47 | done | |
48 | ||
49 | # | |
50 | # Finished | |
51 | # | |
52 | ||
53 | exit $exitval |