rendered paste body#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=90
start() {
local dev
local port
local res
config_get dev servfox Device
config_get port servfox Port
config_get res servfox Resolution
echo $res --- $dev --- $port
config_load servfox
echo "/bin/servfox -d ${dev} -w $port -s $res" > /dev/ttyS0
}
stop() {
killall servfox
}
root@OpenWrt:/etc/init.d# cat /etc/config/servfox
config servfox
option Device '/dev/video0'
option Port '7070'
option Resolution '640x480'
root@OpenWrt:/etc/init.d#
root@OpenWrt:/etc/init.d# ./servfox start
/bin/servfox -d -w -s
root@OpenWrt:/etc/init.d#