2024-09-27 08:17:20 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
TO=dmesg@openbsd.org
|
|
|
|
#TO=sh@codevoid.de
|
|
|
|
FROM=sdk@openbsd.org
|
|
|
|
SUBJECT="$1"
|
|
|
|
|
2024-09-27 08:23:06 +02:00
|
|
|
if [ -z "$SUBJECT" ]
|
2024-09-27 08:17:20 +02:00
|
|
|
then
|
|
|
|
SUBJECT="$(sysctl -n hw.version) - $(doas what /bsd | grep OpenBSD | cut -d"(" -f1 | tr -d '\t')"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "From: $FROM"
|
|
|
|
echo "To: $TO"
|
|
|
|
echo "Subject: $SUBJECT"
|
|
|
|
echo -n "Send with subject [y/N]? "
|
|
|
|
read $REPLY
|
|
|
|
|
|
|
|
case $REPLY in
|
|
|
|
[yY]) ;;
|
|
|
|
*) echo "ok, bye."; exit 0;
|
|
|
|
esac
|
|
|
|
|
|
|
|
(dmesg; sysctl hw.version hw.model hw.sensors) | \
|
|
|
|
mail -r $FROM -s "$SUBJECT" $TO
|
|
|
|
|
|
|
|
echo "sent."
|