wok-tiny annotate ftp-config/receipt @ rev 97
Fix libs build, inet.conf updates ...
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Oct 09 10:21:00 2015 +0200 (2015-10-09) |
parents | 371673f39e46 |
children | 0d8ef9102fc0 |
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@94 | 5 CATEGORY="meta" |
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@86 | 32 grep -q /ftpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT |
pascal@97 | 33 ftp stream tcp nowait root ftpd ftpd $ROOT |
pascal@81 | 34 EOT |
pascal@81 | 35 } |