nbd 0b525a28dc add ftpd-topfield (patch by Andreas Thienemann)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@13726 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-12-22 22:22: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
}