wok-tiny 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 c5d2f4ae4c16
files base-tiny/receipt ftp-config/receipt rsync/receipt telnet-config/receipt
line diff
     1.1 --- a/base-tiny/receipt	Fri Jul 20 00:33:31 2012 +0200
     1.2 +++ b/base-tiny/receipt	Fri Jul 20 12:32:58 2012 +0200
     1.3 @@ -48,6 +48,7 @@
     1.4  config_form()
     1.5  {
     1.6  	[ -n "$PASSWORD"   ] || PASSWORD=root
     1.7 +	[ -n "$HOSTNAME"   ] || HOSTNAME=slitaz
     1.8  	[ -n "$INTERFACE"  ] || INTERFACE=eth0
     1.9  	[ -n "$IP"         ] || IP=192.168.0.6
    1.10  	[ -n "$NETMASK"    ] || NETMASK=255.255.255.0
    1.11 @@ -62,6 +63,10 @@
    1.12  <td><input type="text" name="PASSWORD" value="$PASSWORD" /></td>
    1.13  </tr>
    1.14  <tr>
    1.15 +<td>Host name</td>
    1.16 +<td><input type="text" name="HOSTNAME" value="$HOSTNAME" /></td>
    1.17 +</tr>
    1.18 +<tr>
    1.19  <td>Interface</td>
    1.20  <td><input type="text" name="INTERFACE" value="$INTERFACE" /></td>
    1.21  </tr>
    1.22 @@ -136,6 +141,7 @@
    1.23  grep -qs ^root:: /etc/passwd /etc/shadow && passwd
    1.24  EOT
    1.25  	fi
    1.26 +	[ -n "$HOSTNAME" ] && echo $HOSTNAME > $1/etc/hostname
    1.27  	[ -n "$FSTAB" ] && dos2unix >> $1/etc/fstab <<EOT
    1.28  $FSTAB
    1.29  EOT
     2.1 --- a/ftp-config/receipt	Fri Jul 20 00:33:31 2012 +0200
     2.2 +++ b/ftp-config/receipt	Fri Jul 20 12:32:58 2012 +0200
     2.3 @@ -16,9 +16,10 @@
     2.4  
     2.5  config_form()
     2.6  {
     2.7 +	[ "$UPLOAD" == "on" ] && UPLOAD="ckecked=ckecked " || UPLOAD=
     2.8  	cat <<EOT
     2.9  FTP root <input type="text" name="ROOT" >
    2.10 -allow upload <input type="checkbox" name="UPLOAD" >
    2.11 +allow upload <input type="checkbox" name="UPLOAD" $UPLOAD>
    2.12  EOT
    2.13  }
    2.14  
     3.1 --- a/rsync/receipt	Fri Jul 20 00:33:31 2012 +0200
     3.2 +++ b/rsync/receipt	Fri Jul 20 12:32:58 2012 +0200
     3.3 @@ -48,6 +48,9 @@
     3.4  
     3.5  config_form()
     3.6  {
     3.7 +	[ "$START" == "on" ] && START="ckecked=ckecked " || START=
     3.8 +	[ -n "$RSYNCD_CONF" ] || RSYNCD_CONF="$(cat $1/etc/rsyncd.conf)"
     3.9 +	[ -n "$RSYNCD_SECRETS" ] || RSYNCD_SECRETS="$(cat $1/etc/rsyncd.secrets)
    3.10  	cat <<EOT
    3.11  <p>
    3.12  <input type="checkbox" name="START" > start rsync daemon during boot
    3.13 @@ -55,18 +58,19 @@
    3.14  <fieldset>
    3.15  <legend><i>/etc/rsyncd.conf</i></legend>
    3.16  <textarea name="RSYNCD_CONF" rows="15" cols="60" wrap="off">
    3.17 -$(cat $1/etc/rsyncd.conf)
    3.18 +$RSYNCD_CONF
    3.19  </textarea>
    3.20  </fieldset>
    3.21  <fieldset>
    3.22  <legend><i>/etc/rsyncd.secrets</i></legend>
    3.23  <textarea name="RSYNCD_SECRETS" cols="60" wrap="off">
    3.24 -$(cat $1/etc/rsyncd.secrets)
    3.25 +$RSYNCD_SECRETS
    3.26  </textarea>
    3.27  </fieldset>
    3.28  <fieldset>
    3.29  <legend><i>/etc/rsyncd.motd</i></legend>
    3.30  <textarea name="RSYNCD_MOTD" rows="10" cols="60" wrap="off">
    3.31 +$RSYNCD_MOTD
    3.32  </textarea>
    3.33  </fieldset>
    3.34  EOT
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/telnet-config/receipt	Fri Jul 20 12:32:58 2012 +0200
     4.3 @@ -0,0 +1,21 @@
     4.4 +# SliTaz package receipt.
     4.5 +
     4.6 +PACKAGE="telnet-config"
     4.7 +VERSION="1.0"
     4.8 +CATEGORY="configuration"
     4.9 +SHORT_DESC="Enable Telnet server"
    4.10 +MAINTAINER="pascal.bellard@slitaz.org"
    4.11 +WEB_SITE="http://tiny.slitaz.org/"
    4.12 +DEPENDS="base-tiny"
    4.13 +
    4.14 +# Rules to gen a SliTaz package suitable for Tazpkg.
    4.15 +genpkg_rules()
    4.16 +{
    4.17 +	mkdir -p $fs/etc
    4.18 +}
    4.19 +
    4.20 +post_install()
    4.21 +{
    4.22 +	grep -q telnetd $1/etc/rcS.conf ||
    4.23 +	sed -i 's/^RUN_DAEMONS="/&telnetd /' $1/etc/rcS.conf
    4.24 +}