wok-tiny view hardware-ibm-6272/receipt @ rev 101

Add keyboard, remove fr
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 03 21:58:21 2015 +0100 (2015-11-03)
parents bb00d1e3b0f7
children 981558572b0f
line source
1 # SliTaz package receipt.
3 PACKAGE="hardware-ibm-6272"
4 VERSION="1.0"
5 CATEGORY="meta"
6 MAINTAINER="devel@slitaz.org"
7 LICENSE="BSD"
8 SHORT_DESC="IBM 300GL 6272/6282 (P75-233 ISA/PCI/USB/ETH desktop) hardware support"
9 WEB_SITE="http://www.slitaz.org/"
11 DEPENDS="isapnptools module-cs89x0"
12 SUGGESTED="module-serial module-lp module-floppy"
14 # Post message when installing.
15 post_install()
16 {
17 [ -s $1/etc/init.d/pnp.sh ] || cat > $1/etc/init.d/pnp.sh <<EOT
18 #!/bin/sh
20 . /etc/init.d/rc.functions
21 EOT
22 chmod +x $1/etc/init.d/pnp.sh
23 cat >> $1/etc/init.d/pnp.sh <<EOT
25 echo -n "Switching on cs89x0 isa pnp ethernet card "
26 for io in \$(seq 360 -10 250); do for irq in IRQ_CS89X0_LIST; do
27 pnpdump | awk "BEGIN {s=0} \\
28 /CONFIGURE CSC6040/ {s=1} { \\
29 if (s==0) print; \\
30 else if (/INT 0/) print \\"(INT 0 (IRQ \$irq (MODE +E)))\\"; \\
31 else if (/IO 0/) print \\"(IO 0 (SIZE 16) (BASE 0x0\$io) (CHECK))\\"; \\
32 else if (/ACT Y/) { s=0; print \\"(ACT Y)\\"} \\
33 else print \\
34 }" > /etc/isapnp.conf
35 if isapnp /etc/isapnp.conf > /dev/null 2>&1 ; then
36 modprobe cs89x0 io=0x\$io irq=\$irq > /dev/null 2>&1
37 break 2
38 fi
39 done ; done
40 status
41 EOT
42 grep pnp.sh $1/etc/rcS.conf ||
43 sed -i 's/EARLY_RUN_SCRIPTS="/&pnp.sh /' $1/etc/rcS.conf
44 list=""
45 for i in $IRQ_CS89X0_LIST ; do
46 case " 15 12 11 10 9 7 6 5 4 3 " in
47 *\ $i\ *) list="$list $i "
48 esac
49 done
50 sed -i "s/IRQ_CS89X0_LIST/${list:-15 12 11 10}/" $1/etc/init.d/pnp.sh
51 sed -i 's/cs89x0[^ "]* //' $1/etc/rcS.conf
52 sed -i '/rm -f .sbin.*pnp/d' $1/etc/init.d/pnp.sh
53 [ "$CS89X0_WIPEPNP" == "on" ] &&
54 echo 'rm -f /sbin/pnpdump /sbin/isapnp /etc/isapnp.conf' >> $1/etc/init.d/pnp.sh
55 }
57 config_form()
58 {
59 cat <<EOT
60 <table>
61 <tr>
62 <td>Allowed IRQ for the Ethernet driver cs89x0</td>
63 <td><input type="text" name="IRQ_CS89X0_LIST" value="${IRQ_LIST:-15 12 11 10 9 7 6 5 4 3}" /></td>
64 </tr>
65 </table>
66 <input type="checkbox" name="CS89X0_WIPEPNP" />Remove PNP binaries after use<br>
67 EOT
68 }