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

misc updates
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 30 09:53:55 2016 +0200 (2016-03-30)
parents 0d8ef9102fc0
children d6527924eb96
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@109 5 CATEGORY="network"
pascal@81 6 SHORT_DESC="File transport protocol server configuration"
pascal@4 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@90 8 LICENSE="BSD"
pascal@55 9 WEB_SITE="http://tiny.slitaz.org/"
pascal@4 10 DEPENDS="base-tiny"
pascal@4 11
pascal@4 12 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@4 13 genpkg_rules()
pascal@4 14 {
pascal@4 15 mkdir -p $fs/etc
pascal@4 16 }
pascal@81 17
pascal@81 18 config_form()
pascal@81 19 {
pascal@83 20 [ "$UPLOAD" == "on" ] && UPLOAD="ckecked=ckecked " || UPLOAD=
pascal@81 21 cat <<EOT
pascal@81 22 FTP root <input type="text" name="ROOT" >
pascal@83 23 allow upload <input type="checkbox" name="UPLOAD" $UPLOAD>
pascal@81 24 EOT
pascal@81 25 }
pascal@81 26
pascal@81 27 post_install()
pascal@81 28 {
pascal@81 29 [ -n "$UPLOAD" ] && ROOT="-w $ROOT"
pascal@81 30 grep -q inetd $1/etc/rcS.conf ||
pascal@81 31 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
pascal@112 32 sed -i '/^#ftp/d' $1/etc/inetd.conf
pascal@112 33 grep -q ^ftp $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
pascal@97 34 ftp stream tcp nowait root ftpd ftpd $ROOT
pascal@81 35 EOT
pascal@81 36 }