• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/busybox/examples/var_service/nmeter/
1#!/bin/sh
2
3exec >/dev/null
4exec 2>&1
5exec </dev/null
6
7# Since per-process /proc/net/ (-> /proc/self/net/) appeared,
8# we need to be root
9user="root"
10tty="/dev/tty9"
11cmd="nmeter '%t %c x %x p%p f %f b %b m %m if%[nif]'"
12
13chmod -R a+X . # or else env will moan
14chown "$user": "$tty" # devfs made happy
15
16eval exec \
17env - PATH="$PATH" \
18setuidgid "$user" \
19<"$tty" >"$tty" 2>&1 \
20$cmd
21