From f0c311a19b11c8b997baa91df5acf6522b9fc13e Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Fri, 27 Sep 2024 08:17:20 +0200 Subject: [PATCH] Update 2024-09-27 08:17 OpenBSD/amd64-x13 --- .bin/senddmesg | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 .bin/senddmesg diff --git a/.bin/senddmesg b/.bin/senddmesg new file mode 100755 index 0000000..245b37c --- /dev/null +++ b/.bin/senddmesg @@ -0,0 +1,27 @@ +#!/bin/sh + +TO=dmesg@openbsd.org +#TO=sh@codevoid.de +FROM=sdk@openbsd.org +SUBJECT="$1" + +if [ -z $SUBJECT ] +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."