wok-tiny annotate fbvnc-ssh/receipt @ rev 91
Add missing LICENSE
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 18 10:39:23 2013 +0000 (2013-07-18) |
parents | 5b93527a19eb |
children | 371673f39e46 |
rev | line source |
---|---|
pascal@67 | 1 # SliTaz package receipt. |
pascal@67 | 2 |
pascal@67 | 3 PACKAGE="fbvnc-ssh" |
pascal@67 | 4 VERSION="1.0" |
pascal@67 | 5 CATEGORY="network" |
pascal@67 | 6 SHORT_DESC="VNC client in frame buffer within a SSH tunnel." |
pascal@67 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@91 | 8 LICENSE="BSD" |
pascal@67 | 9 WEB_SITE="http://tiny.slitaz.org/" |
pascal@67 | 10 DEPENDS="base-tiny fbvnc dropbear" |
pascal@67 | 11 |
pascal@67 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@67 | 13 genpkg_rules() |
pascal@67 | 14 { |
pascal@67 | 15 mkdir -p $fs/usr/bin |
pascal@67 | 16 } |
pascal@67 | 17 |
pascal@67 | 18 config_form() |
pascal@67 | 19 { |
pascal@67 | 20 [ "$VNCONLY" == "no" ] || VNCONLY=yes |
pascal@67 | 21 [ -n "$VNCUSER" ] || VNCUSER=tux |
pascal@67 | 22 cat <<EOT |
pascal@67 | 23 <table> |
pascal@67 | 24 <tr> |
pascal@67 | 25 <td>SSH user for the VNC server</td> |
pascal@67 | 26 <td><input type="text" name="VNCUSER" value="$VNCUSER"></td> |
pascal@67 | 27 </tr> |
pascal@67 | 28 <tr> |
pascal@67 | 29 <td>Remove virtual consoles ?</td> |
pascal@67 | 30 <td> |
pascal@67 | 31 <input type="radio" name="VNCONLY" $([ "$VNCONLY" == "no" ] && echo "checked=checked ")value="no"> keep virtual consoles 3 to 6 |
pascal@67 | 32 <input type="radio" name="VNCONLY" $([ "$VNCONLY" == "yes" ] && echo "checked=checked ")value="yes"> keep VNC console only |
pascal@67 | 33 </td> |
pascal@67 | 34 </tr> |
pascal@67 | 35 </table> |
pascal@67 | 36 <p> |
pascal@68 | 37 You should add the public key in <b>\$HOME/.ssh/authorized_keys</b> of the VNC/SSH server. |
pascal@67 | 38 </p> |
pascal@67 | 39 <p> |
pascal@67 | 40 You can get it on the client (from configuration files) with: |
pascal@67 | 41 </p> |
pascal@67 | 42 <pre> |
pascal@67 | 43 # dropbearkey -y -f /etc/dropbear/dropbear_dss_host_key | grep ^ssh |
pascal@67 | 44 </pre> |
pascal@67 | 45 or |
pascal@67 | 46 <pre> |
pascal@67 | 47 # dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key | grep ^ssh |
pascal@67 | 48 </pre> |
pascal@67 | 49 EOT |
pascal@67 | 50 } |
pascal@67 | 51 |
pascal@67 | 52 post_install() |
pascal@67 | 53 { |
pascal@67 | 54 sed -i 's/\(fbvnc -bpp [0-9]*\) \([^|]*\)/\1 127.0.0.1 5900/;/kill -1 1/d' $1/etc/init.d/local.sh |
pascal@67 | 55 cat >> $1/etc/init.d/local.sh <<EOT |
pascal@67 | 56 |
pascal@67 | 57 # From fbvnc-ssh |
pascal@67 | 58 EOT |
pascal@67 | 59 [ "$VNCONLY" == "yes" ] && cat >> $1/etc/init.d/local.sh <<EOT |
pascal@67 | 60 sed -i '/^tty[3-9]:.*/d' /etc/inittab |
pascal@67 | 61 EOT |
pascal@67 | 62 cat >> $1/etc/init.d/local.sh <<EOT |
pascal@67 | 63 grep -qs fbvnc /etc/inittab && |
pascal@67 | 64 sed -i "s|tty2:.*|tty2::respawn:/usr/bin/ssh -i /etc/dropbear/dropbear_dss_host_key -i /etc/dropbear/dropbear_rsa_host_key -y -N -L 5900:127.0.0.1:\$VNCPORT $VNCUSER@\$VNCSERVER|" /etc/inittab |
pascal@67 | 65 kill -1 1 |
pascal@67 | 66 EOT |
pascal@67 | 67 } |