Thu, 06 Dec 2012 15:08:01 +0100
Fixed spelling error, updated address
5 | 1 | #!/bin/bash |
2 | # | |
3 | ############################################################################# | |
14
59e07bba67cc
Fixed spelling error, updated address
Michiel Broek <mbse@mbse.eu>
parents:
5
diff
changeset
|
4 | # Copyright (C) 2005-2012 |
5 | 5 | # |
6 | # Michiel Broek <mbse@mbse.eu> | |
7 | # Beekmansbos 10 | |
8 | # 1971 BV IJmuiden | |
9 | # the Netherlands | |
10 | # | |
14
59e07bba67cc
Fixed spelling error, updated address
Michiel Broek <mbse@mbse.eu>
parents:
5
diff
changeset
|
11 | # This file is part of SlackSecCheckScripts. |
5 | 12 | # |
13 | # This package is free software; you can redistribute it and/or modify it | |
14 | # under the terms of the GNU General Public License as published by the | |
15 | # Free Software Foundation; either version 2, or (at your option) any | |
16 | # later version. | |
17 | # | |
14
59e07bba67cc
Fixed spelling error, updated address
Michiel Broek <mbse@mbse.eu>
parents:
5
diff
changeset
|
18 | # SlackSecCheckScripts is distributed in the hope that it will be useful, but |
5 | 19 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
21 | # General Public License for more details. | |
22 | # | |
23 | # You should have received a copy of the GNU General Public License | |
24 | # along with MBSE BBS; see the file COPYING. If not, write to the Free | |
25 | # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
26 | ############################################################################# | |
27 | ||
28 | ||
29 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
30 | ||
31 | umask 077 | |
32 | TZ=UTC; export TZ | |
33 | LANG=C; export LANG | |
34 | ||
35 | SECUREDIR=`mktemp -d /tmp/_securedir.XXXXXX` || exit 1 | |
36 | ||
37 | trap "/bin/rm -rf $SECUREDIR ; exit 0" EXIT INT QUIT PIPE | |
38 | ||
39 | if ! cd "$SECUREDIR"; then | |
40 | echo "Can not cd to $SECUREDIR". | |
41 | exit 1 | |
42 | fi | |
43 | ||
44 | if [ -x /usr/bin/sensors ]; then | |
45 | if [ ! -n "$(sensors -s 2>&1)" ]; then | |
46 | result=`sensors 2>&1` | |
47 | echo "$result" | |
48 | if echo "$result" |grep -q "ALARM"; then | |
49 | echo "" | |
50 | echo "** WARNING: One or more sensors show ALARM! **" | |
51 | fi | |
52 | fi | |
53 | fi | |
54 |