Set the pointers to the SSL and SSL_CTX objects back to NULL after
[monitoring-plugins.git] / contrib / check_hw.sh
blobf03398eab130f0b45042ca34398cd8c2a72ca9d2
1 #! /bin/sh
3 # Tested on SuSE 9.1 Professional with the hwinfo-8.62-0.2 package installed.
4 #
5 # Before you can run this plugin, you must do:
6 # /usr/sbin/hwinfo --short > /etc/hw.original
7 # add to cron job:
8 # /usr/sbin/hwinfo --short > /etc/hw.current
9 # /usr/bin/diff /etc/hw.original /etc/hw.current > /tmp/hw.check
12 # Rok Debevc -- rok.debevc@agenda.si
15 PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
17 PROGNAME=`basename $0`
18 PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
19 REVISION=`echo '$Revision$' | sed -e 's/[^0-9.]//g'`
21 . $PROGPATH/utils.sh
24 print_usage() {
25 echo "Usage: $PROGNAME"
28 print_help() {
29 print_revision $PROGNAME $REVISION
30 echo ""
31 print_usage
32 echo ""
33 echo "This plugin checks hardware changes."
34 echo ""
35 support
36 exit 0
39 case "$1" in
40 --help)
41 print_help
42 exit 0
44 -h)
45 print_help
46 exit 0
48 --version)
49 print_revision $PROGNAME $REVISION
50 exit 0
52 -V)
53 print_revision $PROGNAME $REVISION
54 exit 0
57 if `du /tmp/hw.check | cut -c 1|grep "^[0]" > /dev/null` ; then
58 echo No hardware is changed
59 exit 0
60 else
61 echo ***hardware is changed*** look into /tmp/hw.check
62 exit 2
65 esac