packages/scpa5xx-view: use lowercase config option, use new service functions
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29078 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
7fdcf9469a
commit
92399c4d51
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=spca5xx-view
|
PKG_NAME:=spca5xx-view
|
||||||
PKG_VERSION:=1
|
PKG_VERSION:=1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=spca5xx-view.tar.bz2
|
PKG_SOURCE:=spca5xx-view.tar.bz2
|
||||||
PKG_SOURCE_URL:=http://www.acmesystems.it/download/owrt
|
PKG_SOURCE_URL:=http://www.acmesystems.it/download/owrt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
config servfox
|
config servfox
|
||||||
option Device '/dev/video0'
|
option device '/dev/video0'
|
||||||
option Port '7070'
|
option port '7070'
|
||||||
option Resolution '640x480'
|
option resolution '640x480'
|
||||||
|
@ -1,31 +1,25 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||||||
|
|
||||||
START=90
|
START=90
|
||||||
|
|
||||||
config_cb() {
|
satrt_instance() {
|
||||||
local cfg="$CONFIG_SECTION"
|
local cfg="$1"
|
||||||
local res
|
local res
|
||||||
local dev
|
local dev
|
||||||
local port
|
local port
|
||||||
local cfgt
|
|
||||||
config_get cfgt "$cfg" TYPE
|
|
||||||
|
|
||||||
case "$cfgt" in
|
config_get res "$cfg" 'resolution'
|
||||||
servfox)
|
config_get dev "$cfg" 'device'
|
||||||
config_get res $cfg Resolution
|
config_get port "$cfg" 'port'
|
||||||
config_get dev $cfg Device
|
service_start bin/servfox ${dev:+-d $dev} ${res:+-s $res} ${port:+-w $port}
|
||||||
config_get port $cfg Port
|
|
||||||
|
|
||||||
SERVFOX_ARGS="${dev:+-d $dev} ${res:+-s $res} ${port:+-w $port}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
config_load servfox
|
config_load 'servfox'
|
||||||
/bin/servfox $SERVFOX_ARGS &
|
config_foreach start_instance 'servfox'
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
killall servfox
|
service_stop /bin/servfox
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user