# HG changeset patch
# User Pascal Bellard <pascal.bellard@slitaz.org>
# Date 1408529359 -7200
# Node ID 227b2c1214c272b616ae7492cc7b00fce51cb949
# Parent  3d34d531561a8463c932230d8fcd1b646d311292
Add tcpd

diff -r 3d34d531561a -r 227b2c1214c2 busybox/stuff/inetd.conf
--- a/busybox/stuff/inetd.conf	Tue Aug 19 23:37:07 2014 +0200
+++ b/busybox/stuff/inetd.conf	Wed Aug 20 12:09:19 2014 +0200
@@ -26,9 +26,10 @@
 
 # These are standard services.
 #
-tftp	dgram	udp	wait	root	/usr/sbin/tftpd	/usr/sbin/tftpd -r /boot
-#systat	stream	tcp	nowait	nobody	/bin/ps
-#netstat	stream	tcp	nowait	root	/bin/netstat	/bin/netstat	-a
-#http	stream	tcp	nowait	root	/usr/sbin/httpd	/usr/sbin/httpd	-i -u 80:80
-#ftp	stream	tcp	nowait	root	/usr/sbin/ftpd	/usr/sbin/ftpd	-w /home/ftp
-#printer	stream	tcp	nowait	root	/usr/sbin/lpd	/usr/sbin/lpd	/var/spool/lpd
+tftp	dgram	udp	wait	root	tftpd	tftpd -r /boot
+#systat	stream	tcp	nowait	nobody	ps
+#netstat	stream	tcp	nowait	root	netstat	netstat	-a
+#http	stream	tcp	nowait	root	httpd	httpd	-i -u 80:80
+#ftp	stream	tcp	nowait	root	ftpd	ftpd	-w /home/ftp
+#printer	stream	tcp	nowait	root	lpd	lpd	/var/spool/lpd
+#telnet	stream	tcp	nowait	root	telnetd	telnetd	-i
diff -r 3d34d531561a -r 227b2c1214c2 dropbear/receipt
--- a/dropbear/receipt	Tue Aug 19 23:37:07 2014 +0200
+++ b/dropbear/receipt	Wed Aug 20 12:09:19 2014 +0200
@@ -9,7 +9,7 @@
 TARBALL="$PACKAGE-$VERSION.tar.bz2"
 WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
 WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
-CONFIG_FILES="/etc/dropbear"
+CONFIG_FILES="/etc/dropbear /etc/inetd.conf"
 SUGGESTED="sftp-server"
 PROVIDE="ssh"
 TAGS="ssh"
@@ -92,7 +92,15 @@
 /etc/dropbear/dropbear_rsa_host_key	/etc/ssh/ssh_host_rsa_key
 /etc/dropbear/dropbear_dss_host_key	/etc/ssh/ssh_host_dsa_key
 EOT
+	grep -q ssh $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
+#ssh	stream	tcp	nowait	root	dropbear	dropbear	-i -b /etc/dropbear/banner
+EOT
 	echo -e "\nTo starts $PACKAGE server you can run :\n"
 	echo "/etc/init.d/$PACKAGE start"
 	echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
 }
+
+post_remove()
+{
+	grep -q dropbear $1/etc/inetd.conf && sed -i '/dropbear/d' $1/etc/inetd.conf
+}
diff -r 3d34d531561a -r 227b2c1214c2 rsync/receipt
--- a/rsync/receipt	Tue Aug 19 23:37:07 2014 +0200
+++ b/rsync/receipt	Wed Aug 20 12:09:19 2014 +0200
@@ -9,7 +9,7 @@
 TARBALL="$PACKAGE-$VERSION.tar.gz"
 WEB_SITE="http://rsync.samba.org/"
 WGET_URL="${WEB_SITE}ftp/rsync/$TARBALL"
-CONFIG_FILES="/etc/rsyncd.conf /etc/rsyncd.secrets"
+CONFIG_FILES="/etc/rsyncd.conf /etc/rsyncd.secrets /etc/inetd.conf"
 TAGS="sync copy secure"
 HOST_ARCH="i486 arm"
 
@@ -46,5 +46,12 @@
 	cp -a $stuff/etc $fs
 	chown root.root $fs/etc/init.d/*
 	chmod 0644 $fs/etc/rsyncd.conf
+	grep -q rsync $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
+#rsync	stream	tcp	nowait	root	rsync	rsync	-daemon
+EOT
+}
 
+post_remove()
+{
+	grep -q rsync $1/etc/inetd.conf && sed -i '/rsync/d' $1/etc/inetd.conf
 }
diff -r 3d34d531561a -r 227b2c1214c2 tcpd/receipt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tcpd/receipt	Wed Aug 20 12:09:19 2014 +0200
@@ -0,0 +1,24 @@
+# SliTaz package receipt.
+
+PACKAGE="tcpd"
+VERSION="7.6"
+CATEGORY="development"
+SHORT_DESC="Wietse Venema's network encapsulation files."
+MAINTAINER="erjo@slitaz.org"
+LICENSE="BSD"
+WANTED="libwrap"
+WEB_SITE="ftp://ftp.porcupine.org/pub/security/index.html"
+HOST_ARCH="i486 arm"
+
+DEPENDS="libwrap"
+
+# Rules to gen a SliTaz package suitable for Tazpkg.
+genpkg_rules()
+{
+	mkdir -p $fs/usr/sbin
+	cp -a $src/tcpd $fs/usr/sbin
+	cp -a $src/tcpdchk $fs/usr/sbin
+	cp -a $src/tcpdmatch $fs/usr/sbin
+	cp -a $src/try-from $fs/usr/sbin
+	cp -a $src/safe_finger $fs/usr/sbin
+}