wok-tiny rev 86

Add lpd-config
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 21 19:04:10 2012 +0200 (2012-08-21)
parents eaaa39422d96
children e2b369ee537b
files dropbear-without-zlib/receipt dropbear/receipt ftp-config/receipt gpxe/receipt lpd-config/receipt manager/receipt p910nd/receipt rsync/receipt telnet-config/receipt wiki/receipt
line diff
     1.1 --- a/dropbear-without-zlib/receipt	Sat Aug 18 08:46:42 2012 +0200
     1.2 +++ b/dropbear-without-zlib/receipt	Tue Aug 21 19:04:10 2012 +0200
     1.3 @@ -58,13 +58,11 @@
     1.4  # Post message when installing.
     1.5  post_install()
     1.6  {
     1.7 -	cat >> $1/etc/daemons.conf <<EOT
     1.8 -
     1.9 -# Dropbear SSH server options.
    1.10 -DROPBEAR_OPTIONS="$DROPBEAR_OPTS"
    1.11 +	grep -q inetd $1/etc/rcS.conf ||
    1.12 +	sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
    1.13 +	grep -q dropbear $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
    1.14 +ssh	stream	tcp	nowait	root	/usr/sbin/dropbear	/usr/sbin/dropbear -i $DROPBEAR_OPTS
    1.15  EOT
    1.16 -	grep -qs 'dropbear ' $1/etc/rcS.conf ||
    1.17 -	sed -i 's/^RUN_DAEMONS="/&dropbear /' $1/etc/rcS.conf
    1.18  	dos2unix <<EOT | uudecode - > $1/etc/dropbear/dropbear_dss_host_key
    1.19  $DSSKEY
    1.20  EOT
     2.1 --- a/dropbear/receipt	Sat Aug 18 08:46:42 2012 +0200
     2.2 +++ b/dropbear/receipt	Tue Aug 21 19:04:10 2012 +0200
     2.3 @@ -58,13 +58,11 @@
     2.4  # Post message when installing.
     2.5  post_install()
     2.6  {
     2.7 -	cat >> $1/etc/daemons.conf <<EOT
     2.8 -
     2.9 -# Dropbear SSH server options.
    2.10 -DROPBEAR_OPTIONS="$DROPBEAR_OPTS"
    2.11 +	grep -q inetd $1/etc/rcS.conf ||
    2.12 +	sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
    2.13 +	grep -q dropbear $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
    2.14 +ssh	stream	tcp	nowait	root	/usr/sbin/dropbear	/usr/sbin/dropbear -i $DROPBEAR_OPTS
    2.15  EOT
    2.16 -	grep -qs 'dropbear ' $1/etc/rcS.conf ||
    2.17 -	sed -i 's/^RUN_DAEMONS="/&dropbear /' $1/etc/rcS.conf
    2.18  	dos2unix <<EOT | uudecode - > $1/etc/dropbear/dropbear_dss_host_key
    2.19  $DSSKEY
    2.20  EOT
     3.1 --- a/ftp-config/receipt	Sat Aug 18 08:46:42 2012 +0200
     3.2 +++ b/ftp-config/receipt	Tue Aug 21 19:04:10 2012 +0200
     3.3 @@ -28,7 +28,7 @@
     3.4  	[ -n "$UPLOAD" ] && ROOT="-w $ROOT"
     3.5  	grep -q inetd $1/etc/rcS.conf ||
     3.6  	sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
     3.7 -	cat >> $1/etc/inetd.conf <<EOT
     3.8 -21	stream	tcp	nowait	root	/usr/sbin/ftpd /usr/sbin/ftpd $ROOT
     3.9 +	grep -q /ftpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
    3.10 +ftp	stream	tcp	nowait	root	/usr/sbin/ftpd /usr/sbin/ftpd $ROOT
    3.11  EOT
    3.12  }
     4.1 --- a/gpxe/receipt	Sat Aug 18 08:46:42 2012 +0200
     4.2 +++ b/gpxe/receipt	Tue Aug 21 19:04:10 2012 +0200
     4.3 @@ -39,8 +39,6 @@
     4.4  	sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
     4.5  	grep -q udhcpd $1/etc/rcS.conf ||
     4.6  	sed -i 's/^RUN_DAEMONS="/&udhcpd /' $1/etc/rcS.conf
     4.7 -	grep -q tftpd $1/etc/rcS.conf ||
     4.8 -	sed -i 's/^RUN_DAEMONS="/&tftpd /' $1/etc/rcS.conf
     4.9  	grep -q tftpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
    4.10  tftp	dgram	udp	wait	root	/usr/bin/tftpd /usr/bin/tftpd -r /usr/share/boot
    4.11  EOT
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/lpd-config/receipt	Tue Aug 21 19:04:10 2012 +0200
     5.3 @@ -0,0 +1,39 @@
     5.4 +# SliTaz package receipt.
     5.5 +
     5.6 +PACKAGE="lpd-config"
     5.7 +VERSION="1.0"
     5.8 +CATEGORY="configuration"
     5.9 +SHORT_DESC="Line printer server configuration (without spooling)"
    5.10 +MAINTAINER="pascal.bellard@slitaz.org"
    5.11 +WEB_SITE="http://tiny.slitaz.org/"
    5.12 +DEPENDS="base-tiny"
    5.13 +
    5.14 +# Rules to gen a SliTaz package suitable for Tazpkg.
    5.15 +genpkg_rules()
    5.16 +{
    5.17 +	mkdir -p $fs/var/spool $fs/dev
    5.18 +}
    5.19 +
    5.20 +config_form()
    5.21 +{
    5.22 +	cat <<EOT
    5.23 +Respective printer names for lp0, lp1 ... 
    5.24 +<input type="text" name="LP_NAMES" value="$LP_NAMES" >
    5.25 +EOT
    5.26 +}
    5.27 +
    5.28 +post_install()
    5.29 +{
    5.30 +	local n
    5.31 +	grep -q inetd $1/etc/rcS.conf ||
    5.32 +	sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
    5.33 +	cat >> $1/etc/inetd.conf <<EOT
    5.34 +printer	stream	tcp	nowait	root	/usr/sbin/lpd /usr/sbin/lpd /var/spool
    5.35 +EOT
    5.36 +	n=0
    5.37 +	for i in $(echo $LP_NAMES | sed 's/,/ /g') ; do
    5.38 +		mknod $1/dev/lp$n c 6 $n
    5.39 +		ln -s /dev/lp$n $1/var/spool/$i
    5.40 +		n=$(($n + 1))
    5.41 +	done
    5.42 +}
     6.1 --- a/manager/receipt	Sat Aug 18 08:46:42 2012 +0200
     6.2 +++ b/manager/receipt	Tue Aug 21 19:04:10 2012 +0200
     6.3 @@ -18,13 +18,10 @@
     6.4  
     6.5  post_install()
     6.6  {
     6.7 -	grep -q httpd $1/etc/rcS.conf ||
     6.8 -	sed -i 's/^RUN_DAEMONS="/&httpd /' $1/etc/rcS.conf
     6.9 -	grep -q HTTPD_OPTIONS $1/etc/daemons.conf ||
    6.10 -	cat >> $1/etc/daemons.conf <<EOT
    6.11 -
    6.12 -# Http daemon options.
    6.13 -HTTPD_OPTIONS="-u 0:0"
    6.14 +	grep -q inetd $1/etc/rcS.conf ||
    6.15 +	sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
    6.16 +	grep -q /httpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
    6.17 +http	stream	tcp	nowait	root	/usr/sbin/httpd	/usr/sbin/httpd -i -u 0:0
    6.18  EOT
    6.19  	while read line comment ; do
    6.20  		grep -qs "^$line" $1/etc/httpd.conf && continue
     7.1 --- a/p910nd/receipt	Sat Aug 18 08:46:42 2012 +0200
     7.2 +++ b/p910nd/receipt	Tue Aug 21 19:04:10 2012 +0200
     7.3 @@ -34,8 +34,6 @@
     7.4  	[ -n "$DEVICES" ] || DEVICES="/dev/lp0"
     7.5  	grep -q inetd $1/etc/rcS.conf ||
     7.6  	sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
     7.7 -	grep -q p910nd $1/etc/rcS.conf ||
     7.8 -	sed -i 's/^RUN_DAEMONS="/&p910nd /' $1/etc/rcS.conf
     7.9  	grep -q p910nd $1/etc/inetd.conf || 
    7.10  	echo "$DEVICES" | dos2unix | awk '{ if ($1 != "") printf \
    7.11  "%d	stream	tcp	nowait	root	%s %s -b -f %s\n", 9100 + n++, \
     8.1 --- a/rsync/receipt	Sat Aug 18 08:46:42 2012 +0200
     8.2 +++ b/rsync/receipt	Tue Aug 21 19:04:10 2012 +0200
     8.3 @@ -17,7 +17,7 @@
     8.4  compile_rules()
     8.5  {
     8.6  	cd $src
     8.7 -sed -i 's/cross_compiling=no/cross_compiling=yes/' configure.sh
     8.8 +	sed -i 's/cross_compiling=no/cross_compiling=yes/' configure.sh
     8.9  	./configure CC=uclibc-$TARGET-cc --host=i486-pc-linux-gnu \
    8.10  		--prefix=/usr \
    8.11  		--mandir=/usr/share/man \
    8.12 @@ -121,6 +121,11 @@
    8.13  		cat > $1/etc/rsyncd.motd <<EOT
    8.14  $RSYNCD_MOTD
    8.15  EOT
    8.16 +		grep -q inetd $1/etc/rcS.conf ||
    8.17 +		sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
    8.18 +		grep -q rsync $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
    8.19 +rsync	stream	tcp	nowait	root	/usr/bin/rsync	/usr/bin/rsync --daemon
    8.20 +EOT
    8.21  	else
    8.22  		rm -f $1/etc/rsyncd.conf $1/etc/rsyncd.secrets \
    8.23  			$1/etc/init.d/rsyncd
     9.1 --- a/telnet-config/receipt	Sat Aug 18 08:46:42 2012 +0200
     9.2 +++ b/telnet-config/receipt	Tue Aug 21 19:04:10 2012 +0200
     9.3 @@ -16,6 +16,9 @@
     9.4  
     9.5  post_install()
     9.6  {
     9.7 -	grep -q telnetd $1/etc/rcS.conf ||
     9.8 -	sed -i 's/^RUN_DAEMONS="/&telnetd /' $1/etc/rcS.conf
     9.9 +	grep -q inetd $1/etc/rcS.conf ||
    9.10 +	sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
    9.11 +	grep -q telnetd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
    9.12 +telnet	stream	tcp	nowait	root	/usr/sbin/telnetd	/usr/sbin/telnetd -i
    9.13 +EOT
    9.14  }
    10.1 --- a/wiki/receipt	Sat Aug 18 08:46:42 2012 +0200
    10.2 +++ b/wiki/receipt	Tue Aug 21 19:04:10 2012 +0200
    10.3 @@ -17,13 +17,10 @@
    10.4  
    10.5  post_install()
    10.6  {
    10.7 -	grep -q httpd $1/etc/rcS.conf ||
    10.8 -	sed -i 's/^RUN_DAEMONS="/&httpd /' $1/etc/rcS.conf
    10.9 -	grep -q HTTPD_OPTIONS $1/etc/daemons.conf ||
   10.10 -	cat >> $1/etc/daemons.conf <<EOT
   10.11 -
   10.12 -# Http daemon options.
   10.13 -HTTPD_OPTIONS="-u 0:0"
   10.14 +	grep -q inetd $1/etc/rcS.conf ||
   10.15 +	sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
   10.16 +	grep -q /httpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
   10.17 +http	stream	tcp	nowait	root	/usr/sbin/httpd	/usr/sbin/httpd -i -u 0:0
   10.18  EOT
   10.19  	while read line comment ; do
   10.20  		grep -qs "^$line" $1/etc/httpd.conf && continue