thepeople 511af51bb9 fix port field, from #7004
git-svn-id: svn://svn.openwrt.org/openwrt/packages@20689 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-04-03 22:23:37 +00:00

36 lines
804 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
config_cb() {
local cfg="$CONFIG_SECTION"
local cfgt
config_get cfgt "$cfg" TYPE
case "$cfgt" in
ftpd-topfield)
config_get turbo $cfg turbo
config_get port $cfg port
config_get elpf $cfg elpf
case "$turbo" in
yes|on|enabled|1) turbo=1;;
esac
case "$elpf" in
yes|on|enabled|1) elpf=1;;
esac
TOPFIELD_ARGS="-D ${turbo:+--turbo }${port:+-P $port }${elpf:+-E}"
;;
esac
}
start() {
config_load ftpd-topfield
/usr/sbin/ftpd-topfield $TOPFIELD_ARGS
}
stop() {
killall ftpd-topfield
}