jack@grinch.acs.umbc.edu (10/10/90)
Two weeks ago I posted to the net for help in setting up a printer attached to a diskless node. I want to thank those that replied to my request, especially the kind soul who referred me to article in the march 1990 issue of the HP communicator. This article was frm Bill Bennett of the Burlington Ma. Sales office. Once we finally tracked down the article :-) we were able to test out the procedure. For us the procedure seems to be working well, we are printing tex dvi, screen dumps and ascii files to a laserjet attached to a professor's workstation. For those interested in the procedure I will summarize the contents of the article. The article describes hooking up a hypotheical printer named lprem connected via an hp-ib at bus address one to a diskless cnode "wonka". Step 1. Run reconfig (1m) on the server as if you were attaching the printer to the server. This will create the needed device files. Step 2. type "ll/dev/*lprem" to see what the device files lok like. There should be two files, /dev/lprem and /dev/rlprem. crw------- 1 lp bin 7 0x070100 Jul 20 13:34 /dev/lprem crw------- 1 lp bin 7 0x070101 Jul 20 13:34 /dev/rlprem Now make the exact same files in the context of the cnode wonka. cd /dev/+wonka mknod lprem c 7 0x070100 wonka mknod rlprem c 7 oxo7o101 wonka chown lp *lprem chgrp bin *lprem chmod 600 *lprem Step 3 Depending on the type of printer and how it is connected, it may be necessary to add a driver to the cnodes kernal. For ciper(256x) printers add the "ciper" driver, For non-ciper HPIB printers, add the printer driver. For serial printers, add the driver for the serial card being used (98644 for internal, 98642 for 4 channel mux, etc.) In this case, since we have a HP-IB device we add the printer driver. Edit the cnode dfile(/etc/conf/dfile+/wonka) and add the line printer Note: if the driver is already present there is no reason to add it. Now make a new kernal for the cnode and reboot. Step 4. In step one we created files in the servers context, these files need to exist to keep lpsched happy, however they should be linked to /dev/null since no printer exists on the server. ln /dev/null /dev/lprem ln /dev/null /dev/rlprem Step 5. Modify the printers interface script. Thes changes cause the script to re-execute itself on the cnode.. Edit /usr/spool/lp/interface/lprem and add the following lines: Cnode=wonka if [ 'cnodes -r = `hostname` ] : then # are we the server args="" device="/dev/`basename $0`" # build printer name While [ $# -gt 0 ] # for all args do... args="$args \"$1" " # save with quotes shift # some have embedded spaces done remsh $Cnode "$0 $args > $device" # run on the remote node exit 0 fi # else we were on the cnode so just # run the script. This assumes that user lp on the server can remsh to the remote cnode and that lp's home directory is /usr/spool/lp. To test whether lp has access on not sign on the server and execute the following commands su - lp # sign on as user lp remsh wonka pwd # try some command. If the command fails modify either /etc/hosts.equiv or /usr/spool/lp/.rhosts permit the command. Once this is enabled try printing to the remote queue. good luck Jack Suess UMBC Academic Computing Internet: Jack@umbc5.umbc.edu Standard Disclaimer: Bitnet: Jack@umbc The opinions expressed above are mine and ATT: 301.455.2582 not my employers.
stevens@hpcc01.HP.COM (Stuart Stevens) (10/11/90)
>> Two weeks ago I posted to the net for help in setting up a printer attached >> to a diskless node. I want to thank those that replied to my request, >> especially the kind soul who referred me to article in the march 1990 issue >> of the HP communicator. This article was frm Bill Bennett of the Burlington >> Ma. Sales office. Once we finally tracked down the article :-) we were >> able to test out the procedure. For us the procedure seems to be working >> well, we are printing tex dvi, screen dumps and ascii files to a laserjet >> attached to a professor's workstation. We are doing a slight variation on cnode printing. In order to standardize the interface scripts and support programs for interface scripts we CDF'd the interface script and placed the following script under the servers script and the desired interace script under the diskless clients interface script. This also means that we made no changes to any interface script. Here is the servers interface script (/usr/spool/lp/interface/sleepy+/<server>): #!/bin/ksh parms="" for parm in "$@" ; do parms="$parms \"$parm\"" done cnode=$(line <member/${0##*/}) #extract printers device cnode=${cnode##*/} #assume last field is cnode remsh $cnode $0 $parms ">/dev/"${0##*/} Each printer's device is "/dev/cnode/<diskless cnode name>". This displays in lpstat and removes the name from the interface script. The script assumes the diskless cnodes name is the last portion of the device name and that the executing script ($0) is a cdf. We also make the actual device name "/dev/<printer name>".