Last change
on this file since 2667 was
2667,
checked in by andersk, 10 years ago
|
check_afs: Add test for getcwd bug
|
-
Property svn:executable set to
*
|
File size:
440 bytes
|
Rev | Line | |
---|
[757] | 1 | #!/bin/sh |
---|
| 2 | . /usr/lib64/nagios/plugins/utils.sh |
---|
| 3 | |
---|
[2152] | 4 | if [ $# -ge 1 ]; then |
---|
[2667] | 5 | CHECKS="$( |
---|
| 6 | /usr/bin/fs checks -cell "$1" -fast && |
---|
| 7 | cd "/afs/$1" && |
---|
| 8 | /bin/dash -c '[ "$(pwd -P)" ]' 2>&1 |
---|
| 9 | )" |
---|
[2152] | 10 | else |
---|
| 11 | CHECKS=`/usr/bin/fs checks -all -fast` |
---|
| 12 | fi |
---|
| 13 | |
---|
[757] | 14 | STATUS=$? |
---|
| 15 | |
---|
| 16 | $ECHO "$CHECKS" |
---|
| 17 | |
---|
| 18 | if [ $STATUS -gt 0 ]; then |
---|
[2023] | 19 | if $ECHO "$CHECKS" | grep -i COCYTUS >/dev/null; then |
---|
[757] | 20 | exit $STATE_CRITICAL; |
---|
| 21 | else |
---|
| 22 | exit $STATE_WARNING; |
---|
| 23 | fi |
---|
| 24 | else |
---|
| 25 | exit $STATE_OK; |
---|
| 26 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.