run 382 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. exec >/dev/null
  3. exec 2>&1
  4. exec </dev/null
  5. # Since per-process /proc/net/ (-> /proc/self/net/) appeared,
  6. # we need to be root
  7. user="root"
  8. tty="/dev/tty9"
  9. cmd="nmeter '%t %c x %x p%p f %f b %b m %m if%[nif]'"
  10. chmod -R a+X . # or else env will moan
  11. chown "$user": "$tty" # devfs made happy
  12. eval exec \
  13. env - PATH="$PATH" \
  14. setuidgid "$user" \
  15. <"$tty" >"$tty" 2>&1 \
  16. $cmd