wok-tiny annotate ftp-config/receipt @ rev 83
Add telnet-config
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 20 12:32:58 2012 +0200 (2012-07-20) |
parents | 86d6fe10f092 |
children | dc8eca11e97c |
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@9 | 5 CATEGORY="configuration" |
pascal@81 | 6 SHORT_DESC="File transport protocol server configuration" |
pascal@4 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@55 | 8 WEB_SITE="http://tiny.slitaz.org/" |
pascal@4 | 9 DEPENDS="base-tiny" |
pascal@4 | 10 |
pascal@4 | 11 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@4 | 12 genpkg_rules() |
pascal@4 | 13 { |
pascal@4 | 14 mkdir -p $fs/etc |
pascal@4 | 15 } |
pascal@81 | 16 |
pascal@81 | 17 config_form() |
pascal@81 | 18 { |
pascal@83 | 19 [ "$UPLOAD" == "on" ] && UPLOAD="ckecked=ckecked " || UPLOAD= |
pascal@81 | 20 cat <<EOT |
pascal@81 | 21 FTP root <input type="text" name="ROOT" > |
pascal@83 | 22 allow upload <input type="checkbox" name="UPLOAD" $UPLOAD> |
pascal@81 | 23 EOT |
pascal@81 | 24 } |
pascal@81 | 25 |
pascal@81 | 26 post_install() |
pascal@81 | 27 { |
pascal@81 | 28 [ -n "$UPLOAD" ] && ROOT="-w $ROOT" |
pascal@81 | 29 grep -q inetd $1/etc/rcS.conf || |
pascal@81 | 30 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf |
pascal@81 | 31 cat >> $1/etc/inetd.conf <<EOT |
pascal@82 | 32 21 stream tcp nowait root /usr/sbin/ftpd /usr/sbin/ftpd $ROOT |
pascal@81 | 33 EOT |
pascal@81 | 34 } |