]>
Commit | Line | Data |
---|---|---|
d2e702cf GI |
1 | #! /bin/sh |
2 | ||
3 | # Send mail | |
4 | echo "$SMARTD_MESSAGE" | mail -s "$SMARTD_FAILTYPE" "$SMARTD_ADDRESS" | |
5 | ||
6 | # Notify desktop user | |
7 | MESSAGE="WARNING: Your hard drive is failing" | |
8 | ||
9 | # direct write to terminals, do not use 'wall', because we don't want its ugly header | |
10 | for t in $(who | awk '{ print $2; }' | grep -e '^tty' -e '^pts/') | |
11 | do | |
12 | echo "$MESSAGE | |
13 | $SMARTD_MESSAGE" >/dev/$t 2>/dev/null ||: | |
14 | done | |
15 |