[af01225] | 1 | <sect2>
|
---|
[17999d4a] | 2 | <title>Configuring <application>LPRng</application></title>
|
---|
[af01225] | 3 |
|
---|
| 4 | <sect3><title>Config files</title>
|
---|
[e80cc95] | 5 | <para><filename>/etc/printcap</filename></para>
|
---|
[af01225] | 6 | </sect3>
|
---|
| 7 |
|
---|
| 8 | <sect3><title>Configuration Information</title>
|
---|
| 9 |
|
---|
| 10 | <para>There is no generic <filename>printcap</filename> for all
|
---|
[8604d92f] | 11 | printers. A sample printcap is loaded into the <filename
|
---|
| 12 | class="directory">etc</filename>
|
---|
[af01225] | 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 |
|
---|
[17999d4a] | 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>
|
---|
[1f77bc8] | 20 |
|
---|
[17999d4a] | 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>
|
---|
[1f77bc8] | 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 |
|
---|
[369af35a] | 29 | . /etc/sysconfig/rc
|
---|
| 30 | . $rc_functions
|
---|
[1f77bc8] | 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
|
---|
[17999d4a] | 65 | <command>EOF
|
---|
| 66 | chmod 755 /etc/rc.d/init.d/lpd</command></userinput></screen>
|
---|
[1f77bc8] | 67 |
|
---|
[af01225] | 68 | <para>Create the symbolic links to the lprng init script in the relevant
|
---|
[a75063d4] | 69 | <filename>rc.d</filename> directories with the following
|
---|
| 70 | commands:</para>
|
---|
[17999d4a] | 71 | <screen><userinput><command>cd /etc/rc.d/init.d &&
|
---|
[af01225] | 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 &&
|
---|
[a75063d4] | 78 | ln -sf ../init.d/lpd ../rc6.d/K00lprng</command></userinput></screen>
|
---|
[af01225] | 79 |
|
---|
| 80 | </sect3>
|
---|
| 81 |
|
---|
| 82 | </sect2>
|
---|
| 83 |
|
---|