On Fri, Dec 15, 2000 at 10:57:43AM +0000, Jamie Heckford wrote:
> On Fri, 15 Dec 2000, you wrote:
> > On Fri, Dec 15, 2000 at 10:54:43AM +0100, Konrad Heuer wrote:
> > > For a heavily loaded printer server (as mine is) this seems not be a good
> > > idea ... but maybe there's a good reason to to this?
> > 
> > I presume this is so that you can list machine aliases in the
> > hosts.lpd file, and to avoid issues with machines that may have
> > more than one interface. One solution would be to run a caching
> > name server on the print server and point resolv.conf at 127.0.0.1.
> > 
> 
> You could also manually add them to /etc/hosts - but this will be a bit tedious
> when you have a lot of machines. Maybe list IP addresses in /etc/hosts.lpd
> instead of hostnames? This could cause alot of reverse lookups though.

Adding hosts.lpd hosts to /etc/hosts could easily be automated; something
like:

while read host; do echo `gh -a $host` $host; done < /etc/hosts.lpd

using the gh resolver query tool from the net/ghtool port; add '>> /etc/hosts'
to the end, then do a sort on /etc/hosts and scan for duplicates..
Something like:

awk '{print $1}' /etc/hosts | sort | uniq -c | \
egrep -v '^[[:space:]]+1[[:space:]]'

..could do the trick :)

G'luck,
Peter

-- 
This sentence contradicts itself - or rather - well, no, actually it doesn't!


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to