Blame SOURCES/smartdnotify

565282
#! /bin/sh
565282
565282
# Send mail
565282
echo "$SMARTD_MESSAGE" | mail -s "$SMARTD_FAILTYPE" "$SMARTD_ADDRESS"
565282
565282
# Notify desktop user
565282
MESSAGE="WARNING: Your hard drive is failing"
565282
565282
# direct write to terminals, do not use 'wall', because we don't want its ugly header
565282
for t in $(who | awk '{ print $2; }' | grep -e '^tty' -e '^pts/')
565282
do
565282
  echo "$MESSAGE
565282
$SMARTD_MESSAGE" >/dev/$t 2>/dev/null ||:
565282
done
565282