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

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