APPENDIX E2:
SCRIPTS AND FILES FROM DISKETTE K0173UW (Rev B)
-rwxrwxr-x 0/10 230 Feb 11 10:49 19977 ./etc/printscreen.printers -rwxrwxr-x 0/10 15 Feb 7 14:01 19977 ./etc/printscreen.options -rwxr-xr-x 0/0 9209 Jan 15 15:16 20033 ./prt-load.51 -rwxrwxr-x 0/10 3657 Aug 11 16:34 19999 ./prt-setup.10 -rwxrwxr-x 0/10 57736 Jul 8 21:51 19999 ./usr/fox/wp/bin/xwd2ps.new -rwxr-xr-x 0/0 50916 Jan 15 14:23 20033 ./kernel/drv/ecpp.new Checksums: xwd2ps 59813 113 ecpp 38726 100 Files different from previous revision: prt-load.51, xwd2ps, ecpp
- This revision adds support to version: 6..4, 6.5; 7.0 (Solaris 8). - This script should be loaded on /var/tmp,, and run on any 51 station that is going to do PrintScreens. - It will ask you for: System Revision Leveel and Printer type IF PRINTER IS HP870/HP890/HP895/HP950/HP960/HP6122, and SW version is equal or lower than 4.2.4, then refer to document B0193SU. IF PRINTER IS HP1200/HP1600, and SW version is equal or lower than 4.0.x/3.x, then refer to document B0193SH. IF PRINTER IS LEXMARK Optra Color 45/XEROXC20/HP2250/HP2280, and software is equal/lower than 4.2.4, then IT IS NOT SUPPORTED. IF PRINTER = HP870/HP890/HP895 AND SW = 4.3.x/6.1.x/6.2/6.3/6.3.x: - If files /etc/printscreen.printers and /etc/printscreen.options, the script will create them. - It will add your printer(s) name to printscreen.options - If your printer description in /etc/printers is "PS PostScript", it will ask you to change it to "Color Script" - It will run this command for your printer name entered (ex: LP05) lpadmin -pLP05 -T hplaser -i /usr/fox/exten/standard -I simple - If v6.5 or lower: lpadmin -pLPxx -H Set fast-1284-compatible = true, in /kernel/drv/ecpp.conf (To have driver handshaking by PIO and not hardware for the new ecpp provided) - If 4.3.x/6.1.x/6.2/6.3/6.4/6.5: Replace: /kernel/drv/ecpp with one from diskette: /kernel/drv/ecpp.conf Add these 2 lines to /etc/system if necessary: set ecpp:ecpp_pio_mode=0x1 set ecpp:ecpp_isr_max_delay=50 IF PRINTER = LEXMARK/XEROX AND SW = 4.3.x/6.1.x/6.2: - If file: /usr/fox/wp/bin/xwd2ps exists, replace if with new one from this floppy. Change mode to: 755 root staff IF 51G (Sun Blade 1000, 2000): - Set fast_centronics = true, in /kernel/drrv/ecpp.conf
- This script should be run only for POSTSCCRIPT--COMM/PW configurations, to fix the problem of SysDef: Assigns Device type = 2 (in IIF.prm) instead of 10 (0a). - Saves IIF.dat/IIF.prm and changes them wiith new values - Syntax: prt-setup.10 STA_LBUG PORT# OLD_PnDEV NEW_Pn_DEV COMM/PW 1-4/1 2/pntjet LEXMARK45/hp1600/hp870/hp895/pntjet - The script MUST BE RUN AGAIN IF A COMMIT INSTALL IS DONE AGAIN!!! - This script started as 'hp100_inst1', it changed to be 'dev-setup', and now is: 'prt-setup.10' hp1600_inst1 --> dev-setup --> prt-setup.10
See below the list of all ASCII files and their contents.
Note: The line below, from script prt-setup.10, doesn't show correctly on this html page:
ed $1 << tag 1 > tmpdev.log
The real script doesn't have spaces around 'tag 1'.
-rwxrwxrwa 6927 Aug 11 1999 ./prt-loadd.51 -rwxrwxrwa 3657 Aug 11 1999 ./prt-setuup.10 -rwxrwxrwa 15 Feb 7 1997 ./etc/prinntscreen.options -rwxrwxrwa 230 Feb 11 1997 ./etc/prinntscreen.printers ========== ./prt-load.51 ========== AW51G1# cat prt-load.51 : # Copyright 1997, 1999 The FOXBORO Company # Filename: prt-load.51 # This loads the printscreen processing files needed to support # the HP870/890/895, HP1600, HP1200, Lexmark45, XeroxC20 printers. # This script should be run on only Solaris systems. # Revision History: # wab 15 Feb 1997 Initial # wab 22 Jul 1999 Upgrade for replacement printers and newer releases. # MKG 23 Dec 2002 CR#267692:Upgrade for replacement printers and newer releases. # Add selections for 6.4, 6.5 and 7.0, HP950/960, HP2250/2280 and HP6122. # set -x # # CR#26792: Add new variables to determine Installation options # OSVER=`uname -r` MACH=`uname -i` PLAT=`uname -m` ECPP_DRV="/kernel/drv/ecpp" ECPPconf="/kernel/drv/ecpp.conf" TGTsys="/etc/system" echo "This script will load the appropriate files on your 51 Series" echo "system to support the HP870C, HP890C, HP895C, HP1200, HP1600," echo "HP2250, HP2280, HP6122, HP950, HP960," echo "Lexmark45, XeroxC20 printers." echo "Run this only on stations originating printscreens." LODSEQ=0 while [ $LODSEQ = 0 ] do echo "Enter the release level of your system." echo "3.x, 4.0.x, 4.1.x, 4.2.1, 4.2.2, 4.2.3, 4.2.4 " echo "4.3.x, 6.1.x, 6.2, 6.3, 6.4, 6.5 or 7.0 \c " echo " ? \c" read REVLVL case $REVLVL in 3.x) LODSEQ=1;; 4.0.x) LODSEQ=1;; 4.1.x) LODSEQ=2;; 4.2.1) LODSEQ=2;; 4.2.2) LODSEQ=2;; 4.2.3) LODSEQ=3;; 4.2.4) LODSEQ=4;; 4.3.x | 6.1.x) LODSEQ=5;; 6.2) LODSEQ=6;; 6.3 | 6.3.x) LODSEQ=7;; 6.4 | 6.5) LODSEQ=8;; 7.0 ) LODSEQ=9;; *) LODSEQ=0 echo " Please enter one of the listed values.";; esac done # # Subrountine used for exit. # endit() { echo "${0}: Done." exit; } PRTDX=0 while [ $PRTDX = 0 ] do echo "Enter the printer type." echo "HP870, HP890, HP895, HP1200, HP1600, LEXMARK45, XEROXC20" echo "HP2250, HP2280, HP6122, HP950, HP960, \c" echo " ? \c" read PRTTYP case $PRTTYP in [Hh][Pp][89][5679][05] | [Hh][Pp]6122 | [Pp][Cc][Ll]3) PRTDX=1 if [ $LODSEQ -le 4 ] then echo "Refer to Manual B0193SU." endit fi;; [Hh][Pp]1[26]00) PRTDX=2 if [ $LODSEQ -le 1 ] then echo "Refer to Manual B0193SH." else echo "This printer is supported. " echo "There is no work to do." fi endit;; LEXMARK45 | [Ll]45 | XEROXC20 | [Xx]20 | [Hh][Pp]22[58]0) PRTDX=3 if [ $LODSEQ -le 4 ] then echo "This printer is not supported in " echo "releases prior to v4.3." endit fi;; *) PRTDX=0 echo " Please enter one of the listed values.";; esac done WDIR=`pwd` # Check if this routine was loaded into /var/tmp as requested # by the printer installation user document. if [ ! \( \( $WDIR = "/var/tmp" \) -o \( $WDIR = "/usr/tmp" \) \) ] then echo "${0} is not in /var/tmp." if [ $WDIR = "/" ] then echo "If you tarred in the diskette from root, you may have " echo "replaced the original files: xwd2ps, printscreen.options " echo "Do you want to continue loading? \c" read ANSWER case $ANSWER in [Yy][Ee][Ss] | [Yy]) :;; *) endit;; esac fi cd /var/tmp fi # # Subroutine to calculate index for save # and to save current file, argument 1. # makesav() { SAVEXT=".sav" SAVBASE=`basename ${1}` SAVPATH=`dirname ${1}` if [ -z $SAVPATH ] ; then SAVPATH="/usr/preserve" ; fi; SAVNAME=${SAVPATH}"/"${SAVBASE}${SAVEXT} COUNT=0 while [ -f $SAVNAME ] do COUNT=`expr $COUNT + 1` SAVNAME=${SAVPATH}"/"${SAVBASE}"-"${COUNT}${SAVEXT} done cp -p ${1} ${SAVNAME}; } # # In Solaris 8 for Sun-Blade-2000s we set fast-centronics to true # set_fast_centronics() { ed $ECPPconf>/dev/null 2>&1 <<-EOF /fast-centronics="false" s/false/true/ . w q EOF } # # In Solaris 2.5.1 with the latest ecpp driver provided by # Patch 104605-12 we set fast-1284-compatible to false to # put driver handshaking controlled by PIO not hardware. # set_1284_compatible() { ed $ECPPconf>/dev/null 2>&1 <<-EOF /fast-1284-compatible="true" s/true/false/ . w q EOF } # # Load the 2 files that all 51 Series need to support PCL3 printers. # This is done for LODSEQ>=5 and PRTDX=1. # This must be done for at every station that originates a PCL3 # printscreen, and for every PCL3 printer logical name. # PCL3OPT="/etc/printscreen.options" PCL3PRT="/etc/printscreen.printers" if [ $PRTDX = 1 ] then if [ -f $PCL3OPT -o -f $PCL3PRT ] then echo "Do you want to save a backup of the current " echo " ${PCL3OPT} file? \c" read ANSWER case $ANSWER in [Nn][Oo] | [Nn]) :;; *) if [ -f $PCL3OPT ] then makesav $PCL3OPT fi if [ -f $PCL3PRT ] then makesav $PCL3PRT fi ;; esac echo "Do you want to ADD to the current or make a NEW " echo " $PCL3OPT file? \c" read ANSWER case $ANSWER in [Nn][Ee][Ww] | [Nn] | [Nn][Ee] ) cd / tar xvf /dev/rfd0 ".${PCL3OPT}" tar xvf /dev/rfd0 ".${PCL3PRT}";; # Make sure there is a .printers file. We do not add to it # here, but one must exist for PCL3 printscreens to work. *) if [ ! -f $PCL3PRT ] then touch $PCL3PRT fi;; esac else cd / tar xvf /dev/rfd0 ".${PCL3OPT}" tar xvf /dev/rfd0 ".${PCL3PRT}" fi ANSWER="what" while [ $ANSWER = "what" ] do echo "What is the logical name of the HP870/890/895/950/960/6122 " echo "PCL3 printer port? \c" read ANSWER case $ANSWER in LP[0-9][0-9]) grep ${ANSWER} $PCL3OPT >/dev/null if [ $? = 1 ] then echo ":${ANSWER} PCL3" >>$PCL3OPT else echo "The printer is already in the $PCL3OPT file." fi grep ${ANSWER} /etc/printers | grep PS >/dev/null if [ $? = 0 ] then echo "Edit /etc/printers file and replace *PS PostScript*" echo " for *Color Script* on the ${ANSWER} entry." fi # If the printer has a local interface, then change its type. lpstat -s | grep "${ANSWER}" | grep device >/dev/null if [ $? = 0 ] then lpadmin -p${ANSWER} -T hplaser -i /usr/fox/exten/standard -I simpl fi if [ $LODSEQ -eq 8 ] then lpadmin -p${ANSWER} -H set_1284_compatible fi echo "\n Enter another logical name or DONE." ANSWER="what";; [Dd][Oo][Nn][Ee] | [Ee][Nn][Dd] | [Ee][Xx][Ii][Tt]) ANSWER="DONE";; *) echo "\n Logical Name is not in correct format." echo " Should be LP digit digit or DONE." ANSWER="what";; esac done if [ $LODSEQ -gt 4 -a $LODSEQ -lt 8 ] then if [ $PLAT = "sun4u" ] then cd / makesav $ECPP_DRV tar xvf /dev/rfd0 ".${ECPP_DRV}.new" mv "${ECPP_DRV}.new" "${ECPP_DRV}" # # Verify if system file needs updates. # Copy system to sav file, and add needed lines # to /etc/system file. ADD1="set ecpp:ecpp_pio_mode=0x1" ADD2="set ecpp:ecpp_isr_max_delay=50" SAVED=0 grep "${ADD1}" ${TGTsys} >/dev/null if [ ${?} = 1 ] then makesav ${TGTsys} SAVED=1 echo ${ADD1} >>${TGTsys} fi grep "${ADD2}" ${TGTsys} >/dev/null if [ ${?} = 1 ] then if [ ${SAVED} -eq 0 ] then makesav ${TGTsys} SAVED=1 fi echo ${ADD2} >>${TGTsys} fi if [ ${SAVED} -eq 0 ] then echo "Did not need to modify ${TGTsys}." else echo "Added lines to ${TGTsys}, after saving current." fi fi fi fi # # Load the file that all 51 Series need to support # PostScript Level 2 emulation in Lexmark and Xerox printers. # This is done for 7>LODSEQ>=5 and PRTDX=3. # This must be loaded at every station which originates a printscreen # that is destined for a Lexmark/Xerox Postscript printer. # if [ $PRTDX = 3 -a $LODSEQ -le 8 ] then XWD2PS="/usr/fox/wp/bin/xwd2ps" if [ -f $XWD2PS ] then makesav $XWD2PS fi cd / if [ $OSVER != "5.8" ] then tar xvf /dev/rfd0 ".${XWD2PS}.new" mv ${XWD2PS}.new ${XWD2PS} fi chmod 755 ${XWD2PS} chown root ${XWD2PS} chgrp staff ${XWD2PS} fi # # 7.0 Release/Solaris 8 changes # if [ $MACH = "SUNW,Sun-Blade-1000" ] then makesav $ECPPconf set_fast_centronics fi endit ========== ./prt-setup.10 ========== : # Copyright The FOXBORO Company, 1997, 1999 # Filename: prt-setup.10 # Device Parameter Set Up # This routine is used to change the device parameters in the # IIF.dat and IIF.prm files. This must be done to place the # correct device type in the vrtx image for PWs and COMM10s, # when they are using the new printer types not yet in the System # Configurator and Software Install. # Revision History: # wab 15 Feb 1997 Started with hp1600_instl file. New name is dev-setup. # Changed PnDEV parameter values range to (1 to 15). # wab 15 Jul 1999 Started with dev-setup and modified it for Lexmark. # New name prt-setup.10. #set -x # Subroutine run to exit. endit() { echo "${0}: Done" exit; } # Subroutine runs when input argument has a mistake. input_err() { echo "\nusage:${0} < station letterbug > < old > < new >\n" echo " - station letterbug - enter the comserver or PW letterbug. " echo " 6 characters (in quotes if spaces needed)." echo " - port number - enter the comserver port number (1-4), " echo " for PW types enter the number 1. " echo " - old PnDEV value - enter pntjet, 2, or valid number." echo " - new PnDEV value - enter hp1600, hp870, hp895, pntjet," echo " LEXMARK45, or valid number." endit } # Subroutine to Parse PnDEV argument. parsePD() { PDVAL=$1 case $PDVAL in [Pp][Nn][Tt][Jj][Ee][Tt]) RETSTR="2 ";; [Hh][Pp]1600) RETSTR="10";; [Hh][Pp]8[79][05]) RETSTR="11";; LEXMARK45 | [Ll]45 | XEROXC20 | [Xx]20) RETSTR="10";; [Pp][Cc][Ll]1) RETSTR="2 ";; [Pp][Cc][Ll]5) RETSTR="10";; [Pp][Cc][Ll]3) RETSTR="11";; 2) RETSTR="2 ";; 10) RETSTR="10";; 11) RETSTR="11";; [1-9]) RETSTR="${1} ";; 1[0-5]) RETSTR="${1}";; *) input_err;; esac } # Subroutine to calculate an index and save a file copy. makesav() { SAVEXT=".sav" SAVBASE=`basename ${1}` SAVPATH=`dirname ${1}` if [ -z $SAVPATH ] ; then SAVPATH="/usr/preserve" ; fi; SAVNAME=${SAVPATH}"/"${SAVBASE}${SAVEXT} COUNT=0 while [ -f $SAVNAME ] do COUNT=`expr $COUNT + 1` SAVNAME=${SAVPATH}"/"${SAVBASE}"-"${COUNT}${SAVEXT} done cp ${1} ${SAVNAME}; } # Subrountine to change IIF files. install1() { ed $1 << tag1 >tmpdev.log /$2/ /$3/ $4 w q tag1 LAST=`tail -1l tmpdev.log` if [ $LAST -eq "?" ] then echo "${0}: ${1}: Change not made!" else echo "${0}: ${1}: Changed." fi } # MAIN PATH OF SCRIPT STARTS DAT=/usr/fox/sp/IIF.dat PRM=/usr/fox/sp/IIF.prm # Check for passed arguments if [ $# -ne 4 ] then input_err fi # Get station letterbug, port, expected PnDEV, and desired PnDEV. LETBUG=$1 PORT=$2 OLDIN=$3 NEWIN=$4 # Generate a report of printers configured. if [ \( $LETBUG -eq "REPORT" \) -a \( $PORT -eq 0 \) ] then awk '{ if( $4 ~ /^P[0-9][A-Z]*/ ) print }' ${PRM} endit fi # Verify second argument is valid port number. if [ \( $PORT -gt 4 \) -o \( $PORT -lt 1 \) ] then input_err fi # Identify and save software install files. if [ -f $DAT ] then makesav $DAT else echo "${0}: IIF.dat file is not available." endit fi if [ -f $PRM ] then makesav $PRM else echo "${0}: IIF.prm file is not available." endit fi parsePD $OLDIN OLD=$RETSTR parsePD $NEWIN NEW=$RETSTR install1 $PRM $LETBUG "${LETBUG} ...... P${PORT}DEV" "s/${OLD} /${NEW} /" install1 $DAT $LETBUG "${LETBUG} ...... P${PORT}DEV" "s/${OLD} /${NEW} /" rm tmpdev.log echo "This script must be run again if a Commit Install is done again." endit ========== ./etc/printscreen.options ========== :LPxx PCL3 ========== ./etc/printscreen.printers ========== :HP680 PCL3 DRAFT RESOLUTION300 LANDSCAPE STD_COLORS_ONLY DELTA_RLE_COMPRESSION REAL_SCALE :HP870 PCL3 NORMAL STD_AND_NOMINAL_COLORS DELTA_RLE_COMPRESSION :HP870P PCL3 NORMAL PORTRAIT STD_AND_NOMINAL_COLORS DELTA_RLE_COMPRESSION