APPENDIX H:
HOW PRINTERS ARE CREATED
1. Everything starts when you define your printers in System Definition.
2. Next, System Definition creates your Committal diskette.
3. Committal diskette has files: "/etc/printers" & "IIF.prm" that are copied to all stations during the Software Install procedure. Both files have parameters to be used for printers definition.
4. Software Install creates "IIF.dat" (data for local printers only), and reinstalls the Operating System on the station hosting the printer.
a) If the printer is connected to a COMM10 processor, it will reinstall OS1CS on the host (AP/AW) of the Communication Processor.
b) If the printer is direct-connected to a 51 (70) station, it will re-install the OpSys of that station. This could be:
OS6AW1 (AW51), OS6AW2 (AW51I), OS5AW1 (AW50) OS6FS1 (AP51), OS6FS2 (AP51I), OS5FS1 (AP50) OS6GC1 (WP51), OS5GC1)(WP50)
5. The 51's OpSys installation run the script:
/opt/fox/OSXXXX/install/upd_padmin (OSXXXX is OpSys pkg)
This program extracts all required printers information from both files:
/etc/printers
/usr/fox/sp/IIF.prm
and using a super awk script creates a temporary file:
PADMIN_IA = /usr/tmp/padmin.ia
6. This file "padmin.ia" has all the required commands: lpadmin, disable, accept, enable, lpfilter, etc, to configure and enable ALL of the printers in the system, FROM this station perspective. See example below, and a few more samples at the end.
# LP11: lpadmin -p LP11 -v /dev/bpp0 -T PS lpadmin -p LP11 -I postscript lpfilter -f djet_graphics -F /etc/lp/fd/djet_graphics.fd cd /etc/lp/interfaces rm LP11 ln -s ps_interface LP11 accept LP11 enable LP11
If the printer is "local" (hosted by this station), the commands will be different from the ones when the printer is "remote" (hosted by other stations).
NOTE: Directory /etc/lp/interfaces has two interface files: "ps_interface", and "lp_standard". The last one is a copy of either: /usr/fox/exten/standard (checks for cs_ofilter to interrupt and print alarm messages), or /usr/lib/lp/model/standard.
7. After running the commands from the 'temporary' file the printers are created for that station. This process will modify several printer related files.
During this process, log files are created in:
/usr/tmp/std_log,
/usr/tmp/err_log
8. On WP51s, "padmin.ia" is removed after execution. On AW51/AP51s this file will remain in /usr/tmp (because line "/bin/rm $PMADMIN_IA" is commented out).
Every time an AW51/AP51 is rebooted, /usr/fox/exten/foxboro.local will run padmin.ia by this section:
#
# COMM Server Processes
#
ONCE NOWAIT NO_NOTIFY 0 /bin/sh /usr/tmp/padmin.ia >/usr/tmp/padmin.log 2 > & 1 EXIT_RESP WAIT NO_NOTIFY 0 /usr/fox/exten/cs_asm >/dev/null < /dev/null 2 > & 1
EXIT_RESP WAIT NO_NOTIFY 0 /usr/fox/exten/cs_foxlpr >/dev/null 2 > & 1
EXIT_RESP WAIT NO_NOTIFY 0 /usr/fox/exten/cs_alarm >/dev/null 2 > & 1
Lines from file "/usr/tmp/padmin.ia" can be used as guidelines on how to issue the correct commands for each printer if ever required.
NOTE: If you want to have this file on a WP51 just modify file /opt/fox/OS6GC1/install/upd_padmin by adding a comment sign:
Before:/bin/rm $PADMIN_IAAfter:
# /bin/rm $PADMIN_IA
However, this file won't run on boot because /usr/fox/exten/foxboro.local for a WP51 doesn't have a section to run the COMM Server Processes.
NOTE: The results from manually running 'upd_padmin' are DIFFERENT from reinstalling the OpSys of the station. I always prefer to do the later.
Example: Change status of OS6AW1 in /usr/fox/sp/IIF.cur from DONE to PCHANG, then run Install_AW by selecting "Canceled/Failed Packages". This will recreate a good padmin.ia
The commands below are part of /usr/tmp/padmin.ia on the printer host, to configure LP11 a direct-connected PostScript printer.
3AWD01# cat /usr/tmp/padmin.ia ... # LP11: lpadmin -p LP11 -v /dev/bpp0 -T PS lpadmin -p LP11 -I postscript lpadmin -p lp -v /dev/bpp0 -T PS lpadmin -p lp -I postscript lpfilter -f djet_graphics -F /etc/lp/fd/djet_graphics.fd cd /etc/lp/interfaces rm LP11 ln -s ps_interface LP11 rm lp ln -s ps_interface lp accept LP11 enable LP11 accept lp enable lp lpadmin -d LP11 lpsystem -t s5 LP11 sacadm -r -p tcp sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v `nlsadmin -V` pmadm -a -p tcp -s lp -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenS5` pmadm -a -p tcp -s lpd -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenBSD -A '\x00020203000000000000000000000000 '` pmadm -a -p tcp -s 0 -i root -v `nlsadmin -V` -m `nlsadmin -c /usr/lib/saf/nlps_server -A '\x00020ACE000000000000000000000000'` ...
The commands below are part of /usr/tmp/padmin.ia on (client) stations different from printer host, to configure the same LP11 printer.
3AWB01# cat /usr/tmp/padmin.ia ... # LP11: lpsystem -t s5 LP11 lpsystem -t s5 3AWD01 lpadmin -p LP11 -s 3AWD01\!LP11 disable LP11 accept LP11 enable LP11 ...
/usr/tmp/padmin.ia for standalone AW51E with two direct connected printers:
LP01 = P132S (Dot-matrix -Okidata- printer direct connected to 51's serial port)
LP02 = PCL3P (PCL3 -HP895- printer direct connected to 51's parallel port)
# LP01: (P132S = Direct connect dot matrix serial printer) chown lp /dev/term/b chmod 600 /dev/term/b lpadmin -p LP01 -v /dev/term/b -o "stty='nl tabs'" lpadmin -p lp -v /dev/term/b -o "stty='nl tabs'" lpadmin -p LP01 -i /usr/fox/exten/standard cd /etc/lp/interfaces rm LP01 ln -s lp_standard LP01 rm lp ln -s lp_standard lp accept LP01 enable LP01 accept lp enable lp lpadmin -d LP01 lpsystem -t bsd LP01 sacadm -r -p tcp sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v `nlsadmin -V` pmadm -a -p tcp -s lp -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenS5` pmadm -a -p tcp -s lpd -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenBSD -A '\x00020203000000000000000000000000'` pmadm -a -p tcp -s 0 -i root -v `nlsadmin -V` -m `nlsadmin -c /usr/lib/saf/nlps_server -A '\x00020ACE000000000000000000000000'` # LP02: (PCL3P = Direct connect PCL3 parallel printer) lpadmin -p LP02 -v /dev/bpp0 -T PS lpadmin -p LP02 -I postscript lpadmin -x lp lpadmin -p lp -v /dev/bpp0 -T PS lpadmin -p lp -I postscript lpfilter -f djet_graphics -F /etc/lp/fd/djet_graphics.fd cd /etc/lp/interfaces rm LP02 ln -s ps_interface LP02 rm lp ln -s ps_interface lp accept LP02 enable LP02 accept lp enable lp lpadmin -d LP02 lpsystem -t bsd LP02 sacadm -r -p tcp sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v `nlsadmin -V` pmadm -a -p tcp -s lp -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenS5` pmadm -a -p tcp -s lpd -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenBSD -A '\x00020203000000000000000000000000'` pmadm -a -p tcp -s 0 -i root -v `nlsadmin -V` -m `nlsadmin -c /usr/lib/saf/nlps_server -A '\x00020ACE000000000000000000000000'` touch /usr/local/local_printer
/usr/tmp/padmin.ia for standalone AW51E with two direct connected printers:
LP01 = P80BWS (Dot-matrix -Okidata 184- printer direct connected to 51's serial port)
LP02 = PSPTRP (PostScript -Lexmark- printer direct connected to 51's parallel port)
# LP01: (P80BWS = Direct connect serial dot matrix printer) chown lp /dev/term/b chmod 600 /dev/term/b lpadmin -p LP01 -v /dev/term/b -o "stty='nl tabs'" lpadmin -p lp -v /dev/term/b -o "stty='nl tabs'" lpadmin -p LP01 -i /usr/fox/exten/standard cd /etc/lp/interfaces rm LP01 ln -s lp_standard LP01 rm lp ln -s lp_standard lp accept LP01 enable LP01 accept lp enable lp lpadmin -d LP01 lpsystem -t bsd LP01 sacadm -r -p tcp sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v `nlsadmin -V` pmadm -a -p tcp -s lp -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenS5` pmadm -a -p tcp -s lpd -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenBSD -A '\x00020203000000000000000000000000'` pmadm -a -p tcp -s 0 -i root -v `nlsadmin -V` -m `nlsadmin -c /usr/lib/saf/nlps_server -A '\x00020ACE000000000000000000000000'` # LP02: (PSPTRP = Direct connect PostScript parallel printer) lpadmin -p LP02 -v /dev/bpp0 -T PS lpadmin -p LP02 -I postscript lpadmin -x lp lpadmin -p lp -v /dev/bpp0 -T PS lpadmin -p lp -I postscript lpfilter -f djet_graphics -F /etc/lp/fd/djet_graphics.fd cd /etc/lp/interfaces rm LP02 ln -s ps_interface LP02 rm lp ln -s ps_interface lp accept LP02 enable LP02 accept lp enable lp lpadmin -d LP02 lpsystem -t bsd LP02 sacadm -r -p tcp sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v `nlsadmin -V` pmadm -a -p tcp -s lp -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenS5` pmadm -a -p tcp -s lpd -i root -v `nlsadmin -V` -m `nlsadmin -o /var/spool/lp/fifos/listenBSD -A '\x00020203000000000000000000000000'` pmadm -a -p tcp -s 0 -i root -v `nlsadmin -V` -m `nlsadmin -c /usr/lib/saf/nlps_server -A '\x00020ACE000000000000000000000000'` touch /usr/local/local_printer
Samples of "padmin.log" on host and remote client stations:
On Printer Host (3AWD01):3AWD01# cat /usr/tmp/padmin.log ... UX:lpadmin: WARNING: "/dev/bpp0" is accessible by others. TO FIX: If other users can access it you may get unwanted output. If this is not what you want change the owner to "lp" and change the mode to 0600. Processing continues. UX:accept: WARNING: Destination "LP11" was already accepting requests. UX:enable: WARNING: Destination "LP11" was already enabled. UX:accept: WARNING: Destination "lp" was already accepting requests. UX:enable: WARNING: Destination "lp" was already enabled. Warning: Using the s5 protocol. The s5 protocol will be removed in a future release. "LP11" has been modified. warning - could not notifyabout modified table try executing the command "sacadm -x -p tcp" warning - could not notify about modified table try executing the command "sacadm -x -p tcp" warning - could not notify about modified table try executing the command "sacadm -x -p tcp" ... "LP04" has been modified. ...
On Client station (3AWB01):
3AWB01# cat /usr/tmp/padmin.log (section for LP11 follows)
...
Warning: Using the s5 protocol.
The s5 protocol will be removed in a future release.
"LP11" has been modified.
Warning: Using the s5 protocol.
The s5 protocol will be removed in a future release.
"3AWD01" has been modified.
printer "LP11" now disabled
UX:accept: WARNING: Destination "LP11" was already accepting
requests.
printer "LP11" now enabled
...