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

Refresh, remove kernel*, add linux
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Oct 02 21:45:05 2015 +0200 (2015-10-02)
parents a6d2ddc65590
children bb00d1e3b0f7
line source
1 # SliTaz package receipt.
3 PACKAGE="lpd-spooling-config"
4 VERSION="1.0"
5 CATEGORY="meta"
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"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/var/spool $fs/dev $fs/usr/sbin
16 cp $stuff/lpd-helper $fs/usr/sbin
17 }
19 config_form()
20 {
21 cat <<EOT
22 Respective printer names for lp0, lp1 ...
23 <input type="text" name="LP_NAMES" value="$LP_NAMES" >
24 EOT
25 }
27 post_install()
28 {
29 local n
30 grep -q inetd $1/etc/rcS.conf ||
31 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
32 cat >> $1/etc/inetd.conf <<EOT
33 printer stream tcp nowait root /usr/sbin/lpd /usr/sbin/lpd /var/spool /usr/sbin/lpd-helper
34 EOT
35 n=0
36 for i in $(echo $LP_NAMES | sed 's/,/ /g') ; do
37 mknod $1/dev/lp$n c 6 $n
38 mkdir $1/var/spool/$i
39 n=$(($n + 1))
40 done
41 }