various patches nico: buildroot-20040825-kmodules.patch.txt buildroot-20040825-tcpdum...
[openwrt/openwrt.git] / obsolete-buildroot / sources / openwrt / ipkg / fprobe / root / etc / init.d / fprobe
1 #!/bin/sh
2
3 DEFAULT=/etc/fprobe.conf
4 OPTIONS=""
5 [ -f $DEFAULT ] && . $DEFAULT
6 [ -n "$IFNAME" ] && OPTIONS="$OPTIONS -i $IFNAME"
7 [ -n "$LOG_LEVEL" ] && OPTIONS="$OPTIONS -v $LOG_LEVEL"
8 [ -n "$REMOTE" ] && OPTIONS="$OPTIONS $REMOTE"
9
10 case $1 in
11 start)
12 [ -d /var/run ] || mkdir -p /var/run
13 /usr/sbin/fprobe $OPTIONS
14 ;;
15 stop)
16 [ -f /var/run/fprobe.pid ] && kill $(cat /var/run/fprobe.pid) >/dev/null 2>&1
17 ;;
18 *)
19 echo "usage: $0 (start|stop)"
20 exit 1
21 esac
22
23 exit $?