source: MondoRescue/branches/2.2.9/mindi-busybox/examples/var_service/nmeter/run@ 3320

Last change on this file since 3320 was 3320, checked in by Bruno Cornec, 9 years ago
  • Re-add (thanks git BTW) the 2.2.9 branch which had been destroyed in the move to 3.0
  • Property svn:executable set to *
File size: 382 bytes
Line 
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
Note: See TracBrowser for help on using the repository browser.