wok-tiny rev 81
fix ftp-config
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 19 23:54:55 2012 +0200 (2012-07-19) |
parents | a53953f4078e |
children | 86d6fe10f092 |
files | ftp-config/receipt p910nd/receipt |
line diff
1.1 --- a/ftp-config/receipt Thu Jul 19 23:03:09 2012 +0200 1.2 +++ b/ftp-config/receipt Thu Jul 19 23:54:55 2012 +0200 1.3 @@ -3,19 +3,31 @@ 1.4 PACKAGE="ftp-config" 1.5 VERSION="1.0" 1.6 CATEGORY="configuration" 1.7 -SHORT_DESC="File transport protocol configuration" 1.8 +SHORT_DESC="File transport protocol server configuration" 1.9 MAINTAINER="pascal.bellard@slitaz.org" 1.10 WEB_SITE="http://tiny.slitaz.org/" 1.11 DEPENDS="base-tiny" 1.12 1.13 -post_install() 1.14 -{ 1.15 - grep -q ftpd $1/etc/rcS.conf || 1.16 - sed -i 's/^RUN_DAEMONS="/&ftpd /' $1/etc/rcS.conf 1.17 -} 1.18 - 1.19 # Rules to gen a SliTaz package suitable for Tazpkg. 1.20 genpkg_rules() 1.21 { 1.22 mkdir -p $fs/etc 1.23 } 1.24 + 1.25 +config_form() 1.26 +{ 1.27 + cat <<EOT 1.28 +FTP root <input type="text" name="ROOT" > 1.29 +allow upload <input type="checkbox" name="UPLOAD" > 1.30 +EOT 1.31 +} 1.32 + 1.33 +post_install() 1.34 +{ 1.35 + [ -n "$UPLOAD" ] && ROOT="-w $ROOT" 1.36 + grep -q inetd $1/etc/rcS.conf || 1.37 + sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf 1.38 + cat >> $1/etc/inetd.conf <<EOT 1.39 +21 stream tcp nowait root /usr/sbin/ftpd /usr/sbin/ftpd $ROOT 1.40 +EOT 1.41 +}
2.1 --- a/p910nd/receipt Thu Jul 19 23:03:09 2012 +0200 2.2 +++ b/p910nd/receipt Thu Jul 19 23:54:55 2012 +0200 2.3 @@ -41,7 +41,7 @@ 2.4 "%d stream tcp nowait root %s %s -b -f %s\n", 9100 + n++, \ 2.5 "/usr/sbin/p910nd", "/usr/sbin/p910nd", $1 }' >> $1/etc/inetd.conf 2.6 for dev in $DEVICES; do 2.7 - mknod -m 660 $fs$dev c 6 ${dev#*lp} 2.8 + mknod -m 660 $1$dev c 6 ${dev#*lp} 2.9 done 2.10 } 2.11