Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
* netlpr: A utility to print to Novel network
@ 1995-03-27 13:04 Yan Xiao
  0 siblings, 0 replies; only message in thread
From: Yan Xiao @ 1995-03-27 13:04 UTC (permalink / raw)


I decided to release my own utility of rerouting
lpd jobs to the local Novel network.

Included is the shell script, which contains instructions.

Yan Xiao, U. Md @ Balto.


-----------Cut here --------- /usr/local/sbin/netlpr -----------
#!/bin/sh

# netlpr (ver 0.2): A utility to print to Novel network
# Yan Xiao <yxiao@umabnet.ab.umd.edu>
#
# Use at your own risk; no warranty whatsoever.
# Postcard-ware.
#
# ##-(0)-####################### README ####################################
# Yan Xiao <yxiao@umabnet.ab.umd.edu>, Mon Mar 20 10:15:03 1995
# Dept of Anesthesiology
# 10 S. Pine St., Rm 534
# U. of Maryland at Baltimore, Maryland 21201 USA
#
# netlpr: to route lpd jobs on LINUX to the local Novel network's
#         printer.
#
# Requirement:
#      1. DOSEMU 0.53pl49
#         (obtained from tsx-11.mit.edu:
#            /pub/linux/ALPHA/dosemu/Development/pre0.53_49.tgz
#      2. LINUX kernel 1.2
#      3. root access to the linux system
#      4. root access to the Novel server.
#      5. The console is in X-window when the printing request is made.
#      6. Novel server captures all printing jobs
#
# Instruction:
#      1. Have DOSEMU running
#      2. Test Novel server access (refer to step (4) below for hints);
#         do a manual printing test: copy <file_to_print> prn /b.
#      3. Setup an account on the Novel, called it "UNIXPRINT"
#         See step (8) and (5) below. This account must NOT have
#         any menu prompt, and it should ONLY do the following
#         things in a row: login, run a batch file, and then logout.
#      4. Follow the 8-steps below.
#
#
# ##-(1)-######################## /etc/printcap #############################
# # Automatic detection
# # Choose appropricated filter as indicated by APSfilter
# lp|LaserJet:\
# 	:lp=/dev/null:\
# 	:sd=/usr/spool/lpd:\
# 	:lf=/usr/spool/lpd/log:\
# 	:af=/usr/spool/lpd/acct:\
# 	:if=/usr/lib/apsfilter/filter/aps-ljet3-letter-auto-1:\
# 	:mx#0:\
#      	:sh: \
#      	:sf:
# #
# # The following is the printer connected to the local Novel.
# # Note all the data conversion has been done (ie for LaserJet
# # printer, the data is in PCL; for PostScript printer, the data
# # is in PS.)
# remote|dos-lp:\
# 	:lp=/dev/null:\
# 	:sd=/usr/spool/lpd/doslpd:\
# 	:lf=/usr/spool/lpd/doslpd/log:\
# 	:af=/usr/spool/lpd/doslpd/acct:\
# 	:if=/usr/local/sbin/netlpr:\
# 	:mx#0:\
#      	:sh: \
#      	:sf:
# ##-(2)-################ Modification to APSfilter ##########################
# #Entry modified in /usr/lib/apsfilter/filter/aps-ljet3-letter-auto-1
# #   (Towards the end; modification labled with <===== MODIFICATION
# #...........................A B B R E V I A T E D......................
# # / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
# # / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
# #   M A I N  ( )
# # / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
# #
# # Here we choose between the general print method
# # file type auto-recognition or force ascii_printing
# #
#
# # modification: pipe it to remote printer
# (                                             # <===== MODIFICATION
# case $METHOD in
# ..........................A B B R E V I A T E D.......................
# esac
# ) | lpr -Premote                              # <===== MODIFICATION
# ..........................A B B R E V I A T E D.......................
#
# ##-(3)-#################### /etc/dosemu.users ###############################
# lp
# bin
# ##-(4)-#################### /var/spool/lpd/dosstart #########################
# pdipx
# netx /ps=anesthlab
# J:login ANESTHLAB/unixprint < e:\netpass.pas
# ##-(5)-#################### /var/spool/lpd/netpass.pas#######################
# <your chosen password for the printer account here>
# ##-(6)-################### C:\CONFIG.SYS in DOSEMU ##########################
# rem this sets up the redirector to look at the Linux root directory.
# rem this is probably not a good idea once you have dosemu installed
# device=c:\emufs.sys /
# device=c:\ems.sys
# files=20
# LASTDRIVE=I
# ##-(7)-################### C:\AUTOEXEC.BAT in DOSEMU ########################
# @echo off
# echo "Welcome to dosemu 0.53pl49!"
# path c:\;d:\dos\dos;d:\dos\sys;c:\automenu
# set temp=c:\
# prompt $p$g
# lredir e: linux\fs\${home}
# e:\dosstart
# ##########################################################################
# ##-(8)-############# Startup batch file for Print Account on Novel #########
# call e:doprint.bat
# logout
# c:exitemu
# ##########################################################################

umask 0000
HOME=/var/spool/lpd
PATH=/bin:/usr/bin:/usr/sbin:/sbin
dormlen=30
export HOME
batchfile=/var/spool/lpd/doprint.bat
FILE=$$.lj

cat -  > $HOME/$FILE
# exit
######################################################################

# First wait for the previous jobs to clear, but it opens for deadloop
while [ -f $batchfile ]
do
	sleep $dormlen
done

echo "copy e:$FILE prn /b\r" > $batchfile
echo "del e:$FILE\r" >> $batchfile

/usr/X11/bin/rxvt -display unix:0 -ic -T DOS -n Printer -e /usr/bin/dos
mv $batchfile /tmp/oldbatch.$$
---------------Cut here-------------------------

--
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember Keywords: and a short description of the software.


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

only message in thread, other threads:[~1995-03-27 13:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-03-27 13:04 netlpr: A utility to print to Novel network Yan Xiao

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