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

Remove ashism ==
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 27 17:43:23 2019 +0100 (7 months ago)
parents 10cf1a5f187d
children e37956962a84
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 DEPENDS="base-tiny"
11 SUGGESTED="module-lp module-usblp"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 mkdir -p $fs/var/spool $fs/dev $fs/usr/sbin
17 cp $stuff/lpd-helper $fs/usr/sbin
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 /usr/sbin/lpd-helper
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 mkdir $1/var/spool/$i
40 n=$(($n + 1))
41 done
42 }