netgear hp printserver


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From: "Brian K. White" <brian@aljex.com> References: <pSzK8.32$ir.47310@news.onenet.net> <shh1guot6e7r5thpkg52j8ttnrlrv6pr54@4ax.com> <rg5M8.33$ir.51703@news.onenet.net> <3d097bf8.71609290@news.highway1.com.au> <3D09CEAA.9030400@aplawrence.com>
Subject: Re: Netgear print server
Date: Fri, 14 Jun 2002 18:07:07 GMT


Hate these ads?



This is a multi-part message in MIME format.



------=_NextPart_000_00BC_01C213AC.D400A570
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit















"Tony Lawrence" <tony@aplawrence.com> wrote in message
news:3D09CEAA.9030400@aplawrence.com...
> James Szabadics wrote:
> > I am using 11 Netgear print servers without netcat.
> >
> > I added the IP address for the netgear PS110 to /etc/hosts
> >
> > used scoadmin printer to add a remote unix printer with the netgear as
> > the host (remember to deselect the option which gives the extented
> > remote printing protocol!!!)
> >
> > For simple setups this is all you have to do!
>
>
> True.  But..  netcat works better.
> /SCOFAQ/scotec7.html#getnetcat




You should maybe edit the sample printer interface script taking into
account the following things:



1 - "ffstrip" is required by the script but not found on my system.



2 - when you use the -oraw option, it's not really raw, it still sends
some init codes.









attached is my take on the above.



I also made a copy of sco's HPLaserJet which preserves everything from the
original and only adds the netcat stuff. In other words, if you had a
printer set up and working using HPLaserJet, it should work the same using
HPLaserJet.nc without any pain in the neck surprises. (as long as you
remember that any LPD printers were not using their interface script
before, and now they will.)



I have doubts about the legality of posting that script, but the changes
were simple enough I think I can make a script that will create a
HPLaserJet.nc by reading (and injecting stuff) your own HPLaserJet. Too
bad diff or patch are not part of the base system...



--
Brian K. White  --  brian@aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx  Linux SCO  Prosper/FACTS AutoCAD  #callahans Satriani





------=_NextPart_000_00BC_01C213AC.D400A570
Content-Type: application/octet-stream;
        name="hplaser.nc"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="hplaser.nc"



#!/bin/ksh=0A=
# copied from aplawrence.com=0A=
# modified so -oraw is really raw=0A=
# =0A=
printer=3D`basename $0`=0A=
request=3D$1=0A=
name=3D$2=0A=
title=3D$3=0A=
copies=3D$4=0A=
options=3D$5=0A=
shift; shift; shift; shift; shift=0A=
spool=3D/usr/spool/lp=0A=
# hey tony, where is ffstrip? =0A=
#FILTER=3D"xtod | ${spool}/bin/ffstrip"=0A=
FILTER=3D"xtod"=0A=
=0A=
# Look for HOST and Port address=0A=
PRTSETUP=3D`grep "^$printer:" /etc/printers.nc`=0A=
if [ $? =3D 0 ]=0A=
then=0A=
PRTHOST=3D`echo $PRTSETUP|awk -F: '{ print $2 }'`=0A=
PRTPORT=3D`echo $PRTSETUP|awk -F: '{ print $3 }'`=0A=
else=0A=
 exit 1=0A=
fi=0A=
=0A=
# border around the banner=0A=
x=3D"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=
XXXXXXX"=0A=
=0A=
Graphics=3Dno=0A=
Landscape=3Dno=0A=
Wide=3Dno=0A=
banner=3Dno  # I don't use banners, have not tested banner=3Dyes=0A=
sixlines=3Dno=0A=
tencpi=3Dno=0A=
Duplex=3Dno=0A=
for i in $options=0A=
do=0A=
        case $i in=0A=
        raw|g|G|pro)    Graphics=3Dyes=0A=
                        ;;=0A=
                l|L)    Landscape=3Dyes=0A=
                        ;;=0A=
                d|D)    Duplex=3Dyes=0A=
                        ;;=0A=
                w|W)   Wide=3Dyes=0A=
                        ;;=0A=
         nobanner|b)    banner=3Dno=0A=
                        ;;=0A=
                6lpi)   sixlines=3Dyes=0A=
                        ;;=0A=
                10cpi)  tencpi=3Dyes=0A=
                        ;;=0A=
        esac=0A=
done=0A=
#=0A=
# Set up FILTER environment variable.=0A=
#=0A=
#=0A=
: ${SPOOLDIR:=3D/usr/spool/lp}=0A=
: ${LOCALPATH:=3D${SPOOLDIR}/bin}=0A=
if [ ! -x "${LPCAT:=3D${LOCALPATH}/lp.cat}" ]=0A=
then=0A=
        LPCAT=3D"cat"=0A=
fi=0A=
=0A=
if [ "$Graphics" =3D "yes" ]=0A=
then=0A=
        FILTER=3D"${LPCAT} 0"=0A=
fi=0A=
=0A=
=0A=
(=0A=
=0A=
[ "Graphics" =3D "no" ] && {=0A=
if [ "$Landscape" =3D yes ]=0A=
then=0A=
        echo "\033E\033&l1o5.45c66F\033(s16.66H\c"=0A=
        [ "$tencpi" =3D yes ] &&  echo "\033(s10H\c"=0A=
elif [ "$Wide" =3D yes ]=0A=
then=0A=
        echo "\033E\033&l0o5.47c88F\033(s16.66H\c"=0A=
else=0A=
        echo "\033E\033&a0L\033&l0o7.27c66F\c"  =0A=
=0A=
fi=0A=
=0A=
if [ "$Duplex" =3D "yes" ]=0A=
then=0A=
        echo "\033&l1S\c"=0A=
else=0A=
        echo "\033&l0S\c"=0A=
fi=0A=
=0A=
if [ "$sixlines" =3D yes ]=0A=
then=0A=
        echo "\033&l6D\c"=0A=
fi=0A=
=0A=
[ "$banner" =3D yes ] && {=0A=
        # get the local system id=0A=
        if test -r /etc/systemid; then=0A=
                sysid=3D`sed 1q /etc/systemid`=0A=
        else=0A=
                sysid=3D`uname -n`=0A=
        fi=0A=
=0A=
        # user =3D fifth field of /etc/passwd=0A=
        user=3D`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" =
/etc/passwd`=0A=
=0A=
        # nhead gets the value of BANNERS or 1 by default=0A=
        nhead=3D`sed -n 's/^BANNERS=3D//p' /etc/default/lpd`=0A=
        [ "$nhead" -ge 0 -a "$nhead" -le 5 ] || nhead=3D1=0A=
=0A=
        # print the banner $nhead times=0A=
        while   [ "$nhead" -gt 0 ]=0A=
        do=0A=
                echo "$x\n"=0A=
                banner "$name"=0A=
                echo "$x\n"=0A=
                [ "$user" ] && echo "User: $user\n"=0A=
                echo "Request id: $request\n"=0A=
                echo "Printer: $printer\n"=0A=
                echo "Options: $options\n"=0A=
                date=0A=
                echo "\nMachine: $sysid\n"=0A=
                [ "$title" ] && banner $title=0A=
                echo "\f\c"=0A=
                nhead=3D`expr $nhead - 1`=0A=
        done=0A=
} # banner=0A=
} # Graphics=0A=
=0A=
# send the file(s) to the standard out $copies times=0A=
while   [ "$copies" -gt 0 ]=0A=
=0A=
do=0A=
        for file=0A=
        do=0A=
                0<${file} eval ${FILTER} =0A=
=0A=
        done=0A=
        copies=3D`expr $copies - 1`=0A=
done ) | /usr/local/bin/netcat -h $PRTHOST -p $PRTPORT=0A=
sleep 1 =0A=
exit 0 =0A=



------=_NextPart_000_00BC_01C213AC.D400A570--








Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


LOD Communications, Inc.

Views for this page
Today This Week This Month This Year  Overall
129178 1,138

/Bofcusm/1618.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

More:
       - Newsgroup




Unix/Linux Consultants

Your ad here - $48.00 yearly!

UBB Computer Services Support for Openserver, Unixware and Linux. Windows integration with Unix/Linux servers. Hardware, Backup and Networking issues. Located near Sacramento CA, we provide onsite support throughout Northern CA and Nationwide via remote access. We are a SCO Authorized Partner and a Microlite BackupEdge Certified Reseller.


http://thatitguy.com Business networking servers, Linux and Unix experts. In business since 1997! Windows and Exchange to Samba and Scalix migration experts.


http://www.m3ipinc.com Security, firewalls, ids, audits, vulnerability assesments, BS7799, HIPAA, GLB, incident handling



Twitter
  • Nov 18 20:41
    I'll be out all day Wednesday the 19th, hard to reach even by phone. Leave a message and have patience.
  • Nov 18 10:07
    What am I doing? Not doing what I WANT to be doing! Oh, well, in every life a little work must fall..




card_image








Change Congress


Related Posts