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