wok-tiny annotate ftp-config/receipt @ rev 81

fix ftp-config
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 19 23:54:55 2012 +0200 (2012-07-19)
parents d3c5f3688ec0
children 86d6fe10f092
rev   line source
pascal@4 1 # SliTaz package receipt.
pascal@4 2
pascal@4 3 PACKAGE="ftp-config"
pascal@4 4 VERSION="1.0"
pascal@9 5 CATEGORY="configuration"
pascal@81 6 SHORT_DESC="File transport protocol server configuration"
pascal@4 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@55 8 WEB_SITE="http://tiny.slitaz.org/"
pascal@4 9 DEPENDS="base-tiny"
pascal@4 10
pascal@4 11 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@4 12 genpkg_rules()
pascal@4 13 {
pascal@4 14 mkdir -p $fs/etc
pascal@4 15 }
pascal@81 16
pascal@81 17 config_form()
pascal@81 18 {
pascal@81 19 cat <<EOT
pascal@81 20 FTP root <input type="text" name="ROOT" >
pascal@81 21 allow upload <input type="checkbox" name="UPLOAD" >
pascal@81 22 EOT
pascal@81 23 }
pascal@81 24
pascal@81 25 post_install()
pascal@81 26 {
pascal@81 27 [ -n "$UPLOAD" ] && ROOT="-w $ROOT"
pascal@81 28 grep -q inetd $1/etc/rcS.conf ||
pascal@81 29 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
pascal@81 30 cat >> $1/etc/inetd.conf <<EOT
pascal@81 31 21 stream tcp nowait root /usr/sbin/ftpd /usr/sbin/ftpd $ROOT
pascal@81 32 EOT
pascal@81 33 }