LPRng-3.8.22

Introduction to LPRng

The LPRng package contains an enhanced, extended and portable implementation of the Berkeley Line PRinter (LPR) print spooler. This is useful for queuing print jobs.

Package information

Installation of LPRng

Install LPRng by running the following commands:

./configure --prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc &&
make &&
make install

Command explanations

--libexecdir=/usr/sbin --sysconfdir=/etc: These switches prevent the default use of /usr/libexec and /usr/etc.

Configuring LPRng

Config files

/etc/printcap

Configuration Information

There is no generic printcap for all printers. A sample printcap is loaded into the etc directory which can be some help. Information is also available at http://www.lprng.org and http://www.linuxprinting.org.

The init script installed by LPRng is not consistent with BLFS scripts; therefore, we will create a new one with the following commands:

mv /etc/rc.d/init.d/lpd /etc/rc.d/init.d/lpd.orig &&
cat > /etc/rc.d/init.d/lpd << "EOF"
#!/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
EOF
chmod 755 /etc/rc.d/init.d/lpd

Create the symbolic links to the lprng init script in the relevant rc.d directories with the following commands:

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

Contents

The LPRng package contains lp, lpq, lpr, lprm, lpstat, lpc and lpd.

Description

lp

lp is a symbolic link to lpr.

lpq

lpq is the status monitoring program.

lpr

lpr is the job spooler program.

lprm

lprm is the job removal program.

lpstat

lpstat is the job status program.

lpc

lpc is the control program for the daemon.

lpd

lpd is the daemon.