diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2013-07-04 20:52:12 -0400 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2013-07-04 20:52:12 -0400 |
commit | 76677bb8f0d1b5f5dd620de995c0c27c6494e93b (patch) | |
tree | e2bd35d29875c46dd0f999a57b505653c54e458b /rc/bin | |
parent | 6d24cced8ffa8c85ecea680d533d83a1ca48bef1 (diff) |
sysinfo: remove -m, add -p, which posts output at http://sysinfo.9front.org, which forwards the information to 9front-sysinfo@9front.org mailing list
Diffstat (limited to 'rc/bin')
-rwxr-xr-x | rc/bin/sysinfo | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/rc/bin/sysinfo b/rc/bin/sysinfo index a071458c3..5f8843f22 100755 --- a/rc/bin/sysinfo +++ b/rc/bin/sysinfo @@ -7,7 +7,7 @@ fn logprog{ 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 @@ fn work{ 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 + print } |