use the same hotplug2 parameters for initramfs and regular
[openwrt.git] / package / spca5xx-view / files / servfox.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
3 START=90
4
5 config_cb() {
6 local cfg="$CONFIG_SECTION"
7 local res
8 local dev
9 local port
10 local cfgt
11 config_get cfgt "$cfg" TYPE
12
13 case "$cfgt" in
14 servfox)
15 config_get res $cfg Resolution
16 config_get dev $cfg Device
17 config_get port $cfg Port
18
19 SERVFOX_ARGS="${dev:+-d $dev} ${res:+-s $res} ${port:+-w $port}"
20 ;;
21 esac
22 }
23
24 start() {
25 config_load servfox
26 /bin/servfox $SERVFOX_ARGS &
27 }
28
29 stop() {
30 killall servfox
31 }
This page took 0.038759 seconds and 5 git commands to generate.