(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



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> <fhqO8.237173$Oa1.21787601@bin8.nnrp.aus1.giganews.com> 
Subject: Re: Netgear print server
Date: Fri, 14 Jun 2002 20:10:51 GMT

This is a multi-part message in MIME format.

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



> 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...

Thanks to diff -e ...

attached is a script to create a HPLaserJet.nc from HPLaserJet on a OSR
5.0.6 box.
it uses "ed" and since this was done on a OSR 5.0.6 box, I can't say if it
will produce a good result on older versions.

I don't think HPLaserJet has changed in a long time, so it might work on
5.0.5 and 5.0.4, I haven't checked. In any event, it won't hurt if you run
it on 5.0.4, it will just create a new file called
/usr/spool/lp/model/HPLaserJet.nc and that file may or may not be junk,
but it won't alter your existing HPLaserJet. I'd make a copy of it first
anyways though.

just run it by doing "sh mkhpljnc.sh"
it uses explicit paths so it doesn't matter where you are when you run it,
you should be root though.

The new interface script HPLaserJet.nc uses the same /etc/printers.nc that
the other netcat script uses (ahh that's another difference, sorry, I
prefered to use /etc/printers.nc instead of /etc/printers for this.)



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


------=_NextPart_000_00ED_01C213BE.1C9FE4B0
Content-Type: application/octet-stream;
        name="mkhpljnc.sh"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="mkhpljnc.sh"

#!/bin/sh=0A=
# script to create a "netcat" version of HPLaserJet=0A=
# created =0A=
# brian@aljex.com=0A=
=0A=
ed /usr/spool/lp/model/HPLaserJet <<%%ED=0A=
742,743c=0A=
${DRAIN} ) | /usr/local/bin/netcat -h $PRTHOST -p $PRTPORT=0A=
sleep 1=0A=
.=0A=
739c=0A=
#stty raw 9600 -parenb cs8 ixon -istrip clocal <&1 2>/dev/null=0A=
.=0A=
267c=0A=
banner=3D"no"=0A=
.=0A=
231a=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=
(=0A=
=0A=
.=0A=
142a=0A=
=0A=
.=0A=
141c=0A=
# Be sure to read the above USE CAUTION before modifying this model. =0A=
.=0A=
15,20d=0A=
4,13c=0A=
# This is a copy of SCO's HPLaserJet with netcat support added=0A=
.=0A=
1,2c=0A=
#!/bin/sh=0A=
# /usr/spool/lp/model/HPLaserJet.nc=0A=
.=0A=
f /usr/spool/lp/model/HPLaserJet.nc=0A=
w=0A=
q=0A=
%%ED=0A=

------=_NextPart_000_00ED_01C213BE.1C9FE4B0--




Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



/Bofcusm/1619.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

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - OSR5
       - Bofcusm


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress