wok-tiny view lpd-config/receipt @ rev 97

Fix libs build, inet.conf updates ...
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Oct 09 10:21:00 2015 +0200 (2015-10-09)
parents 371673f39e46
children 48d2c4c7a227
line source
1 # SliTaz package receipt.
3 PACKAGE="lpd-config"
4 VERSION="1.0"
5 CATEGORY="meta"
6 SHORT_DESC="Line printer server configuration (without spooling)"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://tiny.slitaz.org/"
10 DEPENDS="base-tiny"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/var/spool $fs/dev
16 }
18 config_form()
19 {
20 cat <<EOT
21 Respective printer names for lp0, lp1 ...
22 <input type="text" name="LP_NAMES" value="$LP_NAMES" >
23 EOT
24 }
26 post_install()
27 {
28 local n
29 grep -q inetd $1/etc/rcS.conf ||
30 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
31 cat >> $1/etc/inetd.conf <<EOT
32 printer stream tcp nowait root lpd lpd /var/spool
33 EOT
34 n=0
35 for i in $(echo $LP_NAMES | sed 's/,/ /g') ; do
36 mknod $1/dev/lp$n c 6 $n
37 ln -s /dev/lp$n $1/var/spool/$i
38 n=$(($n + 1))
39 done
40 }