From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,eea8e83861914d48,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1993-09-14 07:50:42 PST Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!wupost!darwin.sura.net!news-feed-2.peachnet.edu!concert!samba.oit.unc.edu!bounce-bounce From: emoenke@gwdg.de (Eberhard Moenkeberg) Newsgroups: comp.os.linux.announce Subject: Remote Printing with SLS Followup-To: comp.os.linux.misc Date: 14 Sep 1993 14:37:51 GMT Organization: None Message-ID: <274kvv$93l@samba.oit.unc.edu> Reply-To: emoenke@gwdg.de (Eberhard Moenkeberg) NNTP-Posting-Host: calypso.oit.unc.edu Keywords: lpd lpr setup script Originator: mdw@sunSITE 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 (emoenke@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 (emoenke@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: emoenke@gwdg.de 37083 Goettingen, Germany Voice: ++49-551-704325 -- Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu