1 | <sect2>
|
---|
2 | <title>Configuring LPRng</title>
|
---|
3 |
|
---|
4 | <sect3><title>Config files</title>
|
---|
5 | <para><filename>/etc/printcap</filename></para>
|
---|
6 | </sect3>
|
---|
7 |
|
---|
8 | <sect3><title>Configuration Information</title>
|
---|
9 |
|
---|
10 | <para>There is no generic <filename>printcap</filename> for all
|
---|
11 | printers. A sample printcap is loaded into the <filename>etc</filename>
|
---|
12 | directory which can be some help. Information is also available at
|
---|
13 | <ulink url="http://www.lprng.org"/> and <ulink
|
---|
14 | url="http://www.linuxprinting.org"/>.</para>
|
---|
15 |
|
---|
16 | <para>The init script installed by LPRng is not consistent with BLFS
|
---|
17 | scripts; therefore, we will create a new one with the following
|
---|
18 | commands:</para>
|
---|
19 |
|
---|
20 | <para><screen><userinput>mv /etc/rc.d/init.d/lpd /etc/rc.d/init.d/lpd.orig &&
|
---|
21 | cat > /etc/rc.d/init.d/lpd << "EOF"</userinput>
|
---|
22 | #!/bin/sh
|
---|
23 | # Begin $rc_base/init.d/lpd
|
---|
24 |
|
---|
25 | # Based on sysklogd script from LFS-3.1 and earlier.
|
---|
26 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
---|
27 |
|
---|
28 | source /etc/sysconfig/rc
|
---|
29 | source $rc_functions
|
---|
30 |
|
---|
31 | case "$1" in
|
---|
32 | start)
|
---|
33 | echo "Starting lpd..."
|
---|
34 | loadproc /usr/sbin/lpd
|
---|
35 | ;;
|
---|
36 |
|
---|
37 | stop)
|
---|
38 | echo "Stopping lpd..."
|
---|
39 | killproc /usr/sbin/lpd
|
---|
40 | ;;
|
---|
41 |
|
---|
42 | reload)
|
---|
43 | echo "Reloading lpd..."
|
---|
44 | reloadproc /usr/sbin/lpd
|
---|
45 | ;;
|
---|
46 |
|
---|
47 | restart)
|
---|
48 | $0 stop
|
---|
49 | sleep 1
|
---|
50 | $0 start
|
---|
51 | ;;
|
---|
52 |
|
---|
53 | status)
|
---|
54 | statusproc /usr/sbin/lpd
|
---|
55 | ;;
|
---|
56 |
|
---|
57 | *)
|
---|
58 | echo "Usage: $0 {start|stop|reload|restart|status}"
|
---|
59 | exit 1
|
---|
60 | ;;
|
---|
61 | esac
|
---|
62 |
|
---|
63 | # End $rc_base/init.d/lpd
|
---|
64 | <userinput>EOF
|
---|
65 | chmod 755 /etc/rc.d/init.d/lpd</userinput></screen></para>
|
---|
66 |
|
---|
67 | <para>Create the symbolic links to the lprng init script in the relevant
|
---|
68 | rc.d directories with the following commands:
|
---|
69 | <screen><userinput>cd /etc/rc.d/init.d &&
|
---|
70 | ln -sf ../init.d/lpd ../rc0.d/K00lprng &&
|
---|
71 | ln -sf ../init.d/lpd ../rc1.d/K00lprng &&
|
---|
72 | ln -sf ../init.d/lpd ../rc2.d/S99lprng &&
|
---|
73 | ln -sf ../init.d/lpd ../rc3.d/S99lprng &&
|
---|
74 | ln -sf ../init.d/lpd ../rc4.d/S99lprng &&
|
---|
75 | ln -sf ../init.d/lpd ../rc5.d/S99lprng &&
|
---|
76 | ln -sf ../init.d/lpd ../rc6.d/K00lprng</userinput></screen></para>
|
---|
77 |
|
---|
78 | </sect3>
|
---|
79 |
|
---|
80 | </sect2>
|
---|
81 |
|
---|