diff options
| author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-02 13:16:24 +0200 |
|---|---|---|
| committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-02 13:16:24 +0200 |
| commit | b15adb7762b6caaecaa83637abfcf5fdb4802092 (patch) | |
| tree | 64eddbe2aa1a7f98a140be0f7973f05d7a781ae0 /contrib/check_hw.sh | |
| parent | c4d5882b9e1d07c7b61091062b7d085fa5f00284 (diff) | |
| download | monitoring-plugins-b15adb7762b6caaecaa83637abfcf5fdb4802092.tar.gz | |
Remove "contrib" plugins
These days, sites such as "Nagios Exchange" are a much better place for
publishing plugins not maintained by the Plugins Development Team.
Diffstat (limited to 'contrib/check_hw.sh')
| -rw-r--r-- | contrib/check_hw.sh | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/contrib/check_hw.sh b/contrib/check_hw.sh deleted file mode 100644 index 9d3b5743..00000000 --- a/contrib/check_hw.sh +++ /dev/null | |||
| @@ -1,66 +0,0 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # | ||
| 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 | ||
| 10 | # | ||
| 11 | # | ||
| 12 | # Rok Debevc -- rok.debevc@agenda.si | ||
| 13 | # | ||
| 14 | # | ||
| 15 | PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin | ||
| 16 | |||
| 17 | PROGNAME=`basename $0` | ||
| 18 | PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` | ||
| 19 | REVISION=`echo '$Revision: 939 $' | sed -e 's/[^0-9.]//g'` | ||
| 20 | |||
| 21 | . $PROGPATH/utils.sh | ||
| 22 | |||
| 23 | |||
| 24 | print_usage() { | ||
| 25 | echo "Usage: $PROGNAME" | ||
| 26 | } | ||
| 27 | |||
| 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 | ||
| 37 | } | ||
| 38 | |||
| 39 | case "$1" in | ||
| 40 | --help) | ||
| 41 | print_help | ||
| 42 | exit 0 | ||
| 43 | ;; | ||
| 44 | -h) | ||
| 45 | print_help | ||
| 46 | exit 0 | ||
| 47 | ;; | ||
| 48 | --version) | ||
| 49 | print_revision $PROGNAME $REVISION | ||
| 50 | exit 0 | ||
| 51 | ;; | ||
| 52 | -V) | ||
| 53 | print_revision $PROGNAME $REVISION | ||
| 54 | exit 0 | ||
| 55 | ;; | ||
| 56 | *) | ||
| 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 | ||
| 63 | fi | ||
| 64 | ;; | ||
| 65 | esac | ||
| 66 | |||
