wok-tiny annotate ftp-config/receipt @ rev 149
Take care of busybox config
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Sep 07 14:54:07 2019 +0200 (2019-09-07) |
parents | 10cf1a5f187d |
children | a28c45a86936 |
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@149 | 11 AUTO_SELECTION="CONFIG_FTPD" |
pascal@4 | 12 DEPENDS="base-tiny" |
pascal@4 | 13 |
pascal@4 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@4 | 15 genpkg_rules() |
pascal@4 | 16 { |
pascal@4 | 17 mkdir -p $fs/etc |
pascal@4 | 18 } |
pascal@81 | 19 |
pascal@81 | 20 config_form() |
pascal@81 | 21 { |
pascal@81 | 22 cat <<EOT |
pascal@126 | 23 FTP root <input type="text" name="ROOT" ${ROOT:+value="$ROOT" }> |
pascal@126 | 24 allow upload <input type="checkbox" name="UPLOAD" ${UPLOAD:+checked="checked" }> |
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@117 | 34 grep -q 'stream.*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 } |