sysinfo: remove -m, add -p, which posts output at http://sysinfo.9front.org, which forwards the information to 9front-sysinfo@9front.org mailing list

This commit is contained in:
stanley lieber 2013-07-04 20:52:12 -04:00
parent 6d24cced8f
commit 76677bb8f0
2 changed files with 29 additions and 12 deletions

View file

@ -7,7 +7,7 @@ fn logprog{
echo echo
} }
fn work{ fn print{
echo '% cd ''#ec''; for(i in *){echo $i ''='' `{cat $i}}' echo '% cd ''#ec''; for(i in *){echo $i ''='' `{cat $i}}'
cd '#ec'; for(i in *){echo $i '=' `{cat $i}} cd '#ec'; for(i in *){echo $i '=' `{cat $i}}
echo echo
@ -43,10 +43,23 @@ fn work{
logprog cat /mnt/apm/ctl logprog cat /mnt/apm/ctl
} }
switch($1){ fn post{
case -m file=/tmp/sysinfo.$user.$pid
{echo Subject: `{cat '#P/cputype'}; work} >[2=1] | print >$file >[2=1]
user=/dev/null upas/smtp 9front.org $user hardware@9front.org @{
case * rfork n
work 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 -p
post
case *
print
} }

View file

@ -4,7 +4,7 @@ sysinfo, sysupdate \- report information about, update the system
.SH SYNOPSIS .SH SYNOPSIS
.B sysinfo .B sysinfo
[ [
.B -m .B -p
] ]
.br .br
.B sysupdate .B sysupdate
@ -19,10 +19,14 @@ the running system, concatenating the output to
stdout. stdout.
.PP .PP
The The
.B -m .B -p
flag causes the output to be piped to a mail command, flag causes the output to be posted at a website
whose recipient is archive,
.B hardware@9front.org. .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 This flag is useful for reporting new installs to the
development team. development team.
.PP .PP