wok-tiny view lpd-spooling-config/receipt @ rev 165

plop: update url
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 20 08:30:01 2020 +0000 (2020-08-20)
parents e37956962a84
children 1e55ea7da8de
line source
1 # SliTaz package receipt.
3 PACKAGE="lpd-spooling-config"
4 VERSION="1.0"
5 CATEGORY="base-system"
6 SHORT_DESC="Line printer server configuration"
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 busybox-net"
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 $fs/dev $fs/usr/sbin
18 cp $stuff/lpd-helper $fs/usr/sbin
19 }
21 config_form()
22 {
23 cat <<EOT
24 Respective printer names for lp0, lp1 ...
25 <input type="text" name="LP_NAMES" value="${LP_NAMES:-printer}" >
26 EOT
27 }
29 post_install()
30 {
31 local n
32 grep -q inetd $1/etc/rcS.conf ||
33 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
34 cat >> $1/etc/inetd.conf <<EOT
35 printer stream tcp nowait root lpd lpd /var/spool /usr/sbin/lpd-helper
36 EOT
37 n=0
38 for i in $(echo $LP_NAMES | sed 's/,/ /g') ; do
39 mknod $1/dev/lp$n c 6 $n
40 mkdir $1/var/spool/$i
41 n=$(($n + 1))
42 done
43 }