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

More verbose titles
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Sep 25 19:09:24 2019 +0200 (2019-09-25)
parents 10cf1a5f187d
children a28c45a86936
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 AUTO_SELECTION="CONFIG_LPD"
11 DEPENDS="base-tiny"
12 SUGGESTED="module-lp module-usblp"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/var/spool
18 }
20 config_form()
21 {
22 cat <<EOT
23 Respective printer names for lp0, lp1 ...
24 <input type="text" name="LP_NAMES" value="${LP_NAMES:-printer}" >
25 EOT
26 }
28 post_install()
29 {
30 local n
31 grep -q inetd $1/etc/rcS.conf ||
32 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
33 cat >> $1/etc/inetd.conf <<EOT
34 printer stream tcp nowait root lpd lpd /var/spool
35 EOT
36 n=0
37 for i in $(echo $LP_NAMES | sed 's/,/ /g') ; do
38 mknod $1/dev/lp$n c 6 $n
39 ln -s /dev/lp$n $1/var/spool/$i
40 n=$(($n + 1))
41 done
42 }