wok-tiny annotate fbvnc-ssh/receipt @ rev 187
Add bootlife (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 04 18:58:39 2024 +0000 (4 months ago) |
parents | a28c45a86936 |
children |
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@110 | 5 CATEGORY="meta" |
pascal@110 | 6 GROUP="network" |
pascal@67 | 7 SHORT_DESC="VNC client in frame buffer within a SSH tunnel." |
pascal@67 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@91 | 9 LICENSE="BSD" |
pascal@67 | 10 WEB_SITE="http://tiny.slitaz.org/" |
pascal@157 | 11 DEPENDS="base-tiny fbvnc-config dropbear-client busybox-net" |
pascal@181 | 12 CONFIG_FILES="/etc/init.d/local.sh" |
pascal@67 | 13 |
pascal@67 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@67 | 15 genpkg_rules() |
pascal@67 | 16 { |
pascal@133 | 17 mkdir -p $fs/etc |
pascal@67 | 18 } |
pascal@67 | 19 |
pascal@67 | 20 config_form() |
pascal@67 | 21 { |
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@127 | 26 <td><input type="text" name="VNCUSER" value="${VNCUSER:-tux}"></td> |
pascal@67 | 27 </tr> |
pascal@67 | 28 <tr> |
pascal@67 | 29 <td>Remove virtual consoles ?</td> |
pascal@67 | 30 <td> |
pascal@142 | 31 <input type="radio" name="VNCONLY" $([ "$VNCONLY" = "no" ] && echo "checked=checked ")value="no"> keep virtual consoles 3 to 6 |
pascal@126 | 32 <input type="radio" name="VNCONLY" $([ "$VNCONLY" != "no" ] && 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@126 | 37 <input type="checkbox" name="ASKFIRST" ${ASKFIRST:+checked=checked }/> |
pascal@110 | 38 Confirm VNC console launch (spare some memory) |
pascal@110 | 39 </p> |
pascal@110 | 40 <p> |
pascal@68 | 41 You should add the public key in <b>\$HOME/.ssh/authorized_keys</b> of the VNC/SSH server. |
pascal@67 | 42 </p> |
pascal@67 | 43 <p> |
pascal@67 | 44 You can get it on the client (from configuration files) with: |
pascal@67 | 45 </p> |
pascal@67 | 46 <pre> |
pascal@67 | 47 # dropbearkey -y -f /etc/dropbear/dropbear_dss_host_key | grep ^ssh |
pascal@67 | 48 </pre> |
pascal@67 | 49 or |
pascal@67 | 50 <pre> |
pascal@67 | 51 # dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key | grep ^ssh |
pascal@67 | 52 </pre> |
pascal@67 | 53 EOT |
pascal@67 | 54 } |
pascal@67 | 55 |
pascal@67 | 56 post_install() |
pascal@67 | 57 { |
pascal@110 | 58 respawn=respawn |
pascal@110 | 59 [ "$ASKFIRST" ] && respawn=askfirst |
pascal@67 | 60 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 | 61 cat >> $1/etc/init.d/local.sh <<EOT |
pascal@67 | 62 |
pascal@67 | 63 # From fbvnc-ssh |
pascal@67 | 64 EOT |
pascal@142 | 65 [ "$VNCONLY" = "yes" ] && cat >> $1/etc/init.d/local.sh <<EOT |
pascal@110 | 66 sed -i '/^tty[2-9]:.*/d' /etc/inittab |
pascal@67 | 67 EOT |
pascal@67 | 68 cat >> $1/etc/init.d/local.sh <<EOT |
pascal@67 | 69 grep -qs fbvnc /etc/inittab && |
pascal@110 | 70 echo "vnc::$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 | 71 kill -1 1 |
pascal@67 | 72 EOT |
pascal@67 | 73 } |