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:
parent
6d24cced8f
commit
76677bb8f0
2 changed files with 29 additions and 12 deletions
|
@ -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
|
||||
}
|
||||
|
||||
switch($1){
|
||||
case -m
|
||||
{echo Subject: `{cat '#P/cputype'}; work} >[2=1] |
|
||||
user=/dev/null upas/smtp 9front.org $user hardware@9front.org
|
||||
case *
|
||||
work
|
||||
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 -p
|
||||
post
|
||||
|
||||
case *
|
||||
print
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue