wok-tiny annotate ftp-config/receipt @ rev 126
Update config_form()
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 12 19:39:46 2017 +0100 (2017-02-12) |
parents | 639516fd97da |
children | e37956962a84 |
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@81 | 21 cat <<EOT |
pascal@126 | 22 FTP root <input type="text" name="ROOT" ${ROOT:+value="$ROOT" }> |
pascal@126 | 23 allow upload <input type="checkbox" name="UPLOAD" ${UPLOAD:+checked="checked" }> |
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@113 | 32 sed -i '/#ftp/d' $1/etc/inetd.conf |
pascal@117 | 33 grep -q 'stream.*ftpd' $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 } |