wok-tiny annotate fbvnc-ssh/receipt @ rev 142
Remove ashism ==
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 27 17:43:23 2019 +0100 (2019-02-27) |
parents | 817547059bd8 |
children | a28c45a86936 |
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@137 | 11 DEPENDS="base-tiny fbvnc-config dropbear-client" |
pascal@67 | 12 |
pascal@67 | 13 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@67 | 14 genpkg_rules() |
pascal@67 | 15 { |
pascal@133 | 16 mkdir -p $fs/etc |
pascal@67 | 17 } |
pascal@67 | 18 |
pascal@67 | 19 config_form() |
pascal@67 | 20 { |
pascal@67 | 21 cat <<EOT |
pascal@67 | 22 <table> |
pascal@67 | 23 <tr> |
pascal@67 | 24 <td>SSH user for the VNC server</td> |
pascal@127 | 25 <td><input type="text" name="VNCUSER" value="${VNCUSER:-tux}"></td> |
pascal@67 | 26 </tr> |
pascal@67 | 27 <tr> |
pascal@67 | 28 <td>Remove virtual consoles ?</td> |
pascal@67 | 29 <td> |
pascal@142 | 30 <input type="radio" name="VNCONLY" $([ "$VNCONLY" = "no" ] && echo "checked=checked ")value="no"> keep virtual consoles 3 to 6 |
pascal@126 | 31 <input type="radio" name="VNCONLY" $([ "$VNCONLY" != "no" ] && echo "checked=checked ")value="yes"> keep VNC console only |
pascal@67 | 32 </td> |
pascal@67 | 33 </tr> |
pascal@67 | 34 </table> |
pascal@67 | 35 <p> |
pascal@126 | 36 <input type="checkbox" name="ASKFIRST" ${ASKFIRST:+checked=checked }/> |
pascal@110 | 37 Confirm VNC console launch (spare some memory) |
pascal@110 | 38 </p> |
pascal@110 | 39 <p> |
pascal@68 | 40 You should add the public key in <b>\$HOME/.ssh/authorized_keys</b> of the VNC/SSH server. |
pascal@67 | 41 </p> |
pascal@67 | 42 <p> |
pascal@67 | 43 You can get it on the client (from configuration files) with: |
pascal@67 | 44 </p> |
pascal@67 | 45 <pre> |
pascal@67 | 46 # dropbearkey -y -f /etc/dropbear/dropbear_dss_host_key | grep ^ssh |
pascal@67 | 47 </pre> |
pascal@67 | 48 or |
pascal@67 | 49 <pre> |
pascal@67 | 50 # dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key | grep ^ssh |
pascal@67 | 51 </pre> |
pascal@67 | 52 EOT |
pascal@67 | 53 } |
pascal@67 | 54 |
pascal@67 | 55 post_install() |
pascal@67 | 56 { |
pascal@110 | 57 respawn=respawn |
pascal@110 | 58 [ "$ASKFIRST" ] && respawn=askfirst |
pascal@67 | 59 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 | 60 cat >> $1/etc/init.d/local.sh <<EOT |
pascal@67 | 61 |
pascal@67 | 62 # From fbvnc-ssh |
pascal@67 | 63 EOT |
pascal@142 | 64 [ "$VNCONLY" = "yes" ] && cat >> $1/etc/init.d/local.sh <<EOT |
pascal@110 | 65 sed -i '/^tty[2-9]:.*/d' /etc/inittab |
pascal@67 | 66 EOT |
pascal@67 | 67 cat >> $1/etc/init.d/local.sh <<EOT |
pascal@67 | 68 grep -qs fbvnc /etc/inittab && |
pascal@110 | 69 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 | 70 kill -1 1 |
pascal@67 | 71 EOT |
pascal@67 | 72 } |