wok-tiny view fbvnc-ssh/receipt @ rev 94

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