mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-06 09:07:30 +08:00
a75063d4ec
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1223 af4574ff-66df-0310-9fd7-8a98e5e911e0
83 lines
2.4 KiB
XML
83 lines
2.4 KiB
XML
<sect2>
|
|
<title>Configuring <application>LPRng</application></title>
|
|
|
|
<sect3><title>Config files</title>
|
|
<para><filename>/etc/printcap</filename></para>
|
|
</sect3>
|
|
|
|
<sect3><title>Configuration Information</title>
|
|
|
|
<para>There is no generic <filename>printcap</filename> for all
|
|
printers. A sample printcap is loaded into the <filename>etc</filename>
|
|
directory which can be some help. Information is also available at
|
|
<ulink url="http://www.lprng.org"/> and <ulink
|
|
url="http://www.linuxprinting.org"/>.</para>
|
|
|
|
<para>The init script installed by <application>LPRng</application> is not
|
|
consistent with <acronym>BLFS</acronym> scripts; therefore, we will create a
|
|
new one with the following commands:</para>
|
|
|
|
<screen><userinput><command>mv /etc/rc.d/init.d/lpd /etc/rc.d/init.d/lpd.orig &&
|
|
cat > /etc/rc.d/init.d/lpd << "EOF"</command>
|
|
#!/bin/sh
|
|
# Begin $rc_base/init.d/lpd
|
|
|
|
# Based on sysklogd script from LFS-3.1 and earlier.
|
|
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
|
|
|
source /etc/sysconfig/rc
|
|
source $rc_functions
|
|
|
|
case "$1" in
|
|
start)
|
|
echo "Starting lpd..."
|
|
loadproc /usr/sbin/lpd
|
|
;;
|
|
|
|
stop)
|
|
echo "Stopping lpd..."
|
|
killproc /usr/sbin/lpd
|
|
;;
|
|
|
|
reload)
|
|
echo "Reloading lpd..."
|
|
reloadproc /usr/sbin/lpd
|
|
;;
|
|
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
|
|
status)
|
|
statusproc /usr/sbin/lpd
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 {start|stop|reload|restart|status}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# End $rc_base/init.d/lpd
|
|
<command>EOF
|
|
chmod 755 /etc/rc.d/init.d/lpd</command></userinput></screen>
|
|
|
|
<para>Create the symbolic links to the lprng init script in the relevant
|
|
<filename>rc.d</filename> directories with the following
|
|
commands:</para>
|
|
<screen><userinput><command>cd /etc/rc.d/init.d &&
|
|
ln -sf ../init.d/lpd ../rc0.d/K00lprng &&
|
|
ln -sf ../init.d/lpd ../rc1.d/K00lprng &&
|
|
ln -sf ../init.d/lpd ../rc2.d/S99lprng &&
|
|
ln -sf ../init.d/lpd ../rc3.d/S99lprng &&
|
|
ln -sf ../init.d/lpd ../rc4.d/S99lprng &&
|
|
ln -sf ../init.d/lpd ../rc5.d/S99lprng &&
|
|
ln -sf ../init.d/lpd ../rc6.d/K00lprng</command></userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|