Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
* Remote Printing with SLS
@ 1993-09-14 14:37 Eberhard Moenkeberg
  0 siblings, 0 replies; only message in thread
From: Eberhard Moenkeberg @ 1993-09-14 14:37 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-09-14 14:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-09-14 14:37 Remote Printing with SLS Eberhard Moenkeberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox