wok-tiny rev 53

Add custom-console
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 05 11:53:51 2011 +0200 (2011-05-05)
parents 898414553540
children 323f22b3742f
files custom-console/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/custom-console/receipt	Thu May 05 11:53:51 2011 +0200
     1.3 @@ -0,0 +1,45 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="custom-console"
     1.7 +VERSION="1.0"
     1.8 +CATEGORY="tiny-slitaz"
     1.9 +SHORT_DESC="Configure a custom console"
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://mirror.slitaz.org/pizza/tiny/"
    1.12 +DEPENDS="base-tiny"
    1.13 +CONFIG_FILES="/etc/inittab"
    1.14 +
    1.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.16 +genpkg_rules()
    1.17 +{
    1.18 +	mkdir -p $fs/etc
    1.19 +	tazpkg get slitaz-boot-scripts
    1.20 +	tazpkg extract slitaz-boot-scripts*.tazpkg
    1.21 +	mv slitaz-boot-scripts*/fs/etc/inittab fs/etc || return 1
    1.22 +	sed -i '/^tty[2-9]::/d' fs/etc/inittab
    1.23 +}
    1.24 +
    1.25 +post_install()
    1.26 +{
    1.27 +	sed -i "s|^tty1:.*|$TTYS::respawn:/sbin/getty $SPEED $TTYS|" \
    1.28 +		$1/etc/inittab
    1.29 +}
    1.30 +
    1.31 +config_form()
    1.32 +{
    1.33 +	[ -n "$TTYS" ] || TTYS=ttyS0
    1.34 +	[ -n "$SPEED" ] || SPEED=38400
    1.35 +	cat <<EOT
    1.36 +You can launch a serial console (ttyS0, ttyS1 ...) or the lguest console (hvc0)
    1.37 +<table>
    1.38 +<tr>
    1.39 +<td>Device</td>
    1.40 +<td><input type="text" name="TTYS" value="$TTYS" /></td>
    1.41 +</tr>
    1.42 +<tr>
    1.43 +<td>Speed</td>
    1.44 +<td><input type="text" name="SPEED" value="$SPEED" /></td>
    1.45 +</tr>
    1.46 +</table>
    1.47 +EOT
    1.48 +}