wok-tiny diff dropbear/receipt @ rev 67

Add fbvnc-ssh
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 11 17:42:22 2011 +0200 (2011-09-11)
parents 412821ea10de
children d62defb9bb77
line diff
     1.1 --- a/dropbear/receipt	Thu Mar 31 22:35:27 2011 +0200
     1.2 +++ b/dropbear/receipt	Sun Sep 11 17:42:22 2011 +0200
     1.3 @@ -6,16 +6,15 @@
     1.4  SHORT_DESC="Light SSH client and server."
     1.5  MAINTAINER="pascal.bellard@slitaz.org"
     1.6  TARBALL="$PACKAGE-$VERSION.tar.gz"
     1.7 -DEPENDS="libutil libcrypt"
     1.8 +DEPENDS="libutil"
     1.9  [ -n "$TARGET" ] || TARGET="i486"
    1.10  BUILD_DEPENDS="dropbear uclibc-cross-compiler-$TARGET"
    1.11  SUGGESTED="sftp-server"
    1.12  WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
    1.13  WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
    1.14 -CONFIG_FILES="/etc/dropbear"
    1.15 +CONFIG_FILES="/etc/dropbear /etc/daemons.conf /etc/rcS.conf"
    1.16  PROVIDE="ssh"
    1.17  TAGS="ssh"
    1.18 -BUGS="should enable zlib"
    1.19  
    1.20  # Rules to configure and make the package.
    1.21  compile_rules()
    1.22 @@ -59,13 +58,20 @@
    1.23  # Post message when installing.
    1.24  post_install()
    1.25  {
    1.26 -	echo "$DSSKEY" | uudecode - > $1/etc/dropbear/dropbear_dss_host_key
    1.27 -	echo "$RSAKEY" | uudecode - > $1/etc/dropbear/dropbear_rsa_host_key
    1.28 +	cat >> $1/etc/daemons.conf <<EOT
    1.29 +
    1.30 +# Dropbear SSH server options.
    1.31 +DROPBEAR_OPTIONS="$DROPBEAR_OPTS"
    1.32 +EOT
    1.33 +	grep -qs 'dropbear ' $1/etc/rcS.conf ||
    1.34 +	sed -i 's/^RUN_DAEMONS="/&dropbear /' $1/etc/rcS.conf
    1.35 +	dos2unix <<EOT | uudecode - > $1/etc/dropbear/dropbear_dss_host_key
    1.36 +$DSSKEY
    1.37 +EOT
    1.38 +	dos2unix <<EOT | uudecode - > $1/etc/dropbear/dropbear_rsa_host_key
    1.39 +$RSAKEY
    1.40 +EOT
    1.41  	chmod 600 $1/etc/dropbear/dropbear_*_host_key
    1.42 -	grep -q dropbear $1/etc/rcS.conf ||
    1.43 -	sed -i 's/^RUN_DAEMONS="/&dropbear /' $1/etc/rcS.conf
    1.44 -	sed -i "s/^DROPBEAR_OPTIONS=.*/DROPBEAR_OPTIONS=\"$DROPBEAR_OPTS\"/" \
    1.45 -		$1/etc/daemons.conf
    1.46  }
    1.47  
    1.48  config_form()
    1.49 @@ -76,11 +82,21 @@
    1.50  		DSSKEY="$(uuencode -m - < /tmp/mkssh$$)"
    1.51  		rm -f /tmp/mkssh$$
    1.52  	fi
    1.53 +	uudecode - > /tmp/mkssh$$ <<EOT
    1.54 +$DSSKEY
    1.55 +EOT
    1.56 +	DSSPUB="$(dropbearkey  -y -f /tmp/mkssh$$ | grep ^ssh)"
    1.57 +	rm -f /tmp/mkssh$$
    1.58  	if [ -z "$RSAKEY" ]; then
    1.59  		dropbearkey -t rsa -f /tmp/mkssh$$ > /dev/null 2>&1
    1.60  		RSAKEY="$(uuencode -m - < /tmp/mkssh$$)"
    1.61  		rm -f /tmp/mkssh$$
    1.62  	fi
    1.63 +	uudecode - > /tmp/mkssh$$ <<EOT
    1.64 +$RSAKEY
    1.65 +EOT
    1.66 +	RSAPUB="$(dropbearkey  -y -f /tmp/mkssh$$ | grep ^ssh)"
    1.67 +	rm -f /tmp/mkssh$$
    1.68  	cat <<EOT
    1.69  <table>
    1.70  <tr>
    1.71 @@ -108,5 +124,13 @@
    1.72  <pre>
    1.73  # dropbearconvert openssh dropbear /etc/ssh/id_dsa /dev/stdout | uuencode -m -
    1.74  </pre>
    1.75 +Default DSS public key is
    1.76 +<pre>
    1.77 +$DSSPUB
    1.78 +</pre>
    1.79 +Default RSA public key is
    1.80 +<pre>
    1.81 +$RSAPUB
    1.82 +</pre>
    1.83  EOT
    1.84  }