It is currently Thu, 20 Jan 2022 11:03:07 GMT



 
Author Message
 Remote Printing with SLS
Here are two little scripts which may help setting up remote
printing with the SLS distributions.

The first, called "lpd.build", builds the whole environment on the
Linux side. The second, called "lpd.add", is a stripped version for
adding some printers later - after the environment is built.

There is nothing exciting in it - it just does all what is necessary.

================= start of lpd.build =================
#/bin/sh
#
# setup remote printing for SLS 1.03
#
# The only thing else which is to do:
# the remote site has to provide an entry in it's
#    /etc/hosts.lpd (to grant access)
#
# by Eberhard Moenkeberg (emoe...@gwdg.de)
# devoted to Peter MacDonald and his "Volks-Linux"
#
# to run this script: pwd must be etc
#                     uid must be root
#

# name of the printer host
#
# >>>>> fill in your own - you won't reach mine <<<<<
#
HOST=softland.paradise.edu

# list of useable remote printer (queue) names
#
# >>>>> fill in your own, obtainable from the host's /etc/printcap <<<<<
#
PRINTERS="hp3ps hp4ps qms"

########### no changes necessary below here ########################

# list of involved executables & their location
#
PROGS="lpc lpq lpr lprm"
LOC="../usr/bin/"

# spool directory & file names
#
SPOOLDIR=/usr/spool/lpd
FILES=".seq lock status"

# where the errors should get reported
#
ERRDIR=/usr/adm/lpd-errs

# set up lpd
#
echo "/etc/lpd &" >>rc.local

# set up program permissions & ownership
#
for i in ${PROGS};
do
(       chown root.daemon ${LOC}$i;
        chmod -v u=rwx,g=xs,o=x ${LOC}$i;
);
done
chmod -v u+xs ${LOC}lpq
chmod -v u=rwx,g=rxs lpd
chown root.daemon lpd

# build all files for lpd
#
mkdir ..${SPOOLDIR}
chown root.daemon ..${SPOOLDIR}
chmod -v ug=rwx,o=rx ..${SPOOLDIR}
(       cd ..${SPOOLDIR}
        for i in ${PRINTERS};
        do
        (       mkdir $i;
                chown root.daemon $i;
                chmod -v ug=rwx,o=rx $i;
                (       cd $i;
                        for j in ${FILES};
                        do
                        (       touch $j;
                                chmod -v ug=rw,o=r $j;
                                chown root.daemon $j);
                        done
                        );
                );
        done
)

# pwd has to be "etc" now
#
mkdir ..${ERRDIR}

# build printcap entries
#
for i in ${PRINTERS};
do echo "${i}:lp=:rm=${HOST}:rp=${i}:lf=${ERRDIR}:sd=${SPOOLDIR}/${i}:" >>printcap;
done

########### end ###########
=================== end of lpd.build =================

================= start of lpd.add ===================
#/bin/sh
#
# add remote printers for SLS 1.03
#
# The only thing else which is to do:
# the remote site has to provide an entry in it's
#    /etc/hosts.lpd (to grant access)
#
# by Eberhard Moenkeberg (emoe...@gwdg.de)
# devoted to Peter MacDonald and his "Volks-Linux"
#
# to run this script: pwd must be etc
#                     uid must be root
#

# name of the printer host
#
# >>>>> fill in your own - you won't reach mine <<<<<
#
HOST=softland.paradise.edu

# list of useable remote printer (queue) names
#
# >>>>> fill in your own, obtainable from the host's /etc/printcap <<<<<
#
PRINTERS="kyops2 kyops2d1 kyops2d2"

########### no changes necessary below here ########################

# spool directory & file names
#
SPOOLDIR=/usr/spool/lpd
FILES=".seq lock status"

# build all files for lpd
#
(       cd ..${SPOOLDIR}
        for i in ${PRINTERS};
        do
        (       mkdir $i;
                chmod -v ug=rwx,o=rx $i;
                chown root.daemon $i;
                (       cd $i;
                        for j in ${FILES};
                        do
                        (       touch $j;
                                chmod -v ug=rw,o=r $j;
                                chown root.daemon $j);
                        done
                        );
                );
        done
)

# pwd has to be "etc" now
#
# build printcap entries
#
for i in ${PRINTERS};
do echo "${i}:lp=:rm=${HOST}:rp=${i}:lf=${ERRDIR}:sd=${SPOOLDIR}/${i}:" >>printcap;
done

################## end ########################
=================== end of lpd.add ===================

  Eberhard
--
      Eberhard Moenkeberg        FIDO:     2:241/3410.27  
      Reinholdstr. 14            Internet: emoe...@gwdg.de
      37083 Goettingen, Germany  Voice:    ++49-551-704325

--
Send submissions for comp.os.linux.announce to: linux-annou...@tc.cornell.edu



 Sat, 02 Mar 1996 22:37:51 GMT   
 
   [ 1 post ] 

Similar Threads

1. Remote printing problem: waiting for remote system to come up

2. Remote Printing w/o Remote Machine

3. remote dailup printing on the remote site

4. problems with remote printing under AIX 3.2 (and other remote access problems)

5. RS/6000 remote printing to numeric remote queue

6. Remote printing to remote unix printer problem with cpi= option

7. Howto send print jobs to a remote print server (SMC Barricade)

8. remote printing - print filters never being called?

9. Printing question (remote printing)


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software