ref: d18e81a650c38d36a41820a351d9585a4166e02d
parent: 8424eea8a7422a534117ecc0dca9930e3bf5c588
author: stanley lieber <stanley.lieber@gmail.com>
date: Thu Jul 4 16:52:12 EDT 2013
sysinfo: remove -m, add -p, which posts output at http://sysinfo.9front.org, which forwards the information to 9front-sysinfo@9front.org mailing list
--- a/rc/bin/sysinfo
+++ b/rc/bin/sysinfo
@@ -7,7 +7,7 @@
echo
}
-fn work{+fn print{ echo '% cd ''#ec''; for(i in *){echo $i ''='' `{cat $i}}' cd '#ec'; for(i in *){echo $i '=' `{cat $i}}echo
@@ -43,10 +43,23 @@
logprog cat /mnt/apm/ctl
}
+fn post{+ file=/tmp/sysinfo.$user.$pid
+ print >$file >[2=1]
+ @{+ rfork n
+ webfs
+ hpost -u http://sysinfo.9front.org -p / a_body@$file submit:submit fake:fake a_func:add_post url: |
+ grep -e '\/body\"' |
+ sed 1q | sed 's/^.*href=\"//g; s/body\".*$/body/g; s/^/http:\/\/sysinfo.9front.org/g'
+ rm -f $file
+ }
+}
+
switch($1){-case -m
- {echo Subject: `{cat '#P/cputype'}; work} >[2=1] |- user=/dev/null upas/smtp 9front.org $user hardware@9front.org
+case -p
+ post
+
case *
- work
}
--- a/sys/man/1/sysinfo
+++ b/sys/man/1/sysinfo
@@ -4,7 +4,7 @@
.SH SYNOPSIS
.B sysinfo
[
-.B -m
+.B -p
]
.br
.B sysupdate
@@ -19,10 +19,14 @@
stdout.
.PP
The
-.B -m
-flag causes the output to be piped to a mail command,
-whose recipient is
-.B hardware@9front.org.
+.B -p
+flag causes the output to be posted at a website
+archive,
+.B http://sysinfo.9front.org,
+which in turn forwards the message to a
+mailing list,
+.B 9front-sysinfo@9front.org.
+A URL pointing to the archived output is returned.
This flag is useful for reporting new installs to the
development team.
.PP
--
⑨