5 echo "Usage: $0 <fs> [email]"
7 echo " fs - file system to check"
8 echo " email - send warning to specified e-mail address (print to stdout, if omitted)"
9 echo "Example: $0 /srv/remoteshare admin@cutekittens.tld"
19 echo "mail -s \"$subject\" $1"
23 if ! mount |
grep "on $1 type nfs" > /dev
/null
25 subject
="WARNING! Network file system ($1) on $(hostname) is not mounted!"
27 [ -z "$2" ] && echo "${subject}"
28 CMD
=$
(make_command
"$2")
30 This is to inform you that no NFS is mounted at $1.
31 Please investigate immediately!
35 elif ! timeout
15 stat
"$1" > /dev
/null
37 subject
="WARNING! Network file system ($1) on $(hostname) is hanging/unreachable!"
39 [ -z "$2" ] && echo "${subject}"
40 CMD
=$
(make_command
"$2")
42 This is to inform you that network share $1 is hanging/unreachable.
48 Please investigate immediately!