🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #21403

Re: Slrn 0.8.8 domain name recognition patch

#21403
From: John Caruso
Date: Wed, 08 May 1996 00:00
65 lines
2916 bytes
On 5 May 1996, Felix von Leitner <leitner@sandmann.prz.tu-berlin.de> wrote:
>
>>  - newer resolvers use "search", not "domain" in resolv.conf
>
>Newer resolvers don't choke on domain clause, so it does not hurt to
>have them there.
>[...]
>No.  I fail to construct a case where this patch does any harm.

Sorry, but that isn't true.  This patch was apparently incorporated into
slrn 0.8.8.1 and it did indeed break the configure script.

If a site is using "search" instead of "domain", this patch causes the
configure script to fail.  The patch assumes that if /etc/resolv.conf
exists there will necessarily be a "domain" line in the file, which is a
faulty assumption since both "search" and "domain" are perfectly acceptable
(and mutually exclusive) ways of setting the default domain.  If there's
no "domain" line, slrn_cv_domain gets set to nothing and subsequent uses
of it cause the configure script to bomb with "test: argument expected".

The following replacement code handles "search" lines correctly and also
handles the case where neither "search" nor "domain" are present:

-------- cut here -------------------------------------------------------
*** configure	Tue May  7 16:17:26 1996
--- configure.new	Tue May  7 16:30:05 1996
***************
*** 1724,1733 ****
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -f /etc/resolv.conf; then
! 	slrn_cv_domain=`grep domain /etc/resolv.conf | sed 's/^domain *//'`
! else
  	slrn_cv_domain=no
! fi
  fi
  
  echo "$ac_t""$slrn_cv_domain" 1>&6
--- 1724,1738 ----
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -f /etc/resolv.conf; then
! 	slrn_cv_domain=`(grep "^domain" /etc/resolv.conf ||
! 			 grep "^search" /etc/resolv.conf) |
! 			awk '{ print $2 }'`
!   fi
! 
!   if test -z "$slrn_cv_domain"; then
  	slrn_cv_domain=no
!   fi
! 
  fi
  
  echo "$ac_t""$slrn_cv_domain" 1>&6
-------- cut here -------------------------------------------------------

--
John Caruso, Senior Technical Consultant
ADP Claims Solutions Group                 Phone: (800) 366-4237 x2102
2010 Crow Canyon Place                     FAX  : (510) 866-4839
San Ramon, CA  94583 (USA)                 Email: jcaruso@sr.csg.com


Technical Details
Message-ID: <slrn4ovpq6.e1m.jcaruso@raptor.sr.csg.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn4ococl.91u.leitner@xorn.prz.tu-berlin.de> <slrn4onp1j.nu.karrer@kuru.ee.ethz.ch> <4miel3$hgf@sandmann.prz.tu-berlin.de>

Show Full Headers
Complete Article Headers
Message-ID: <slrn4ovpq6.e1m.jcaruso@raptor.sr.csg.com>
Subject: Re: Slrn 0.8.8 domain name recognition patch
Date: Wed, 08 May 1996 00:00:00 +0000
From: jcaruso@sr.csg.com (John Caruso)
References: <slrn4ococl.91u.leitner@xorn.prz.tu-berlin.de> <slrn4onp1j.nu.karrer@kuru.ee.ethz.ch> <4miel3$hgf@sandmann.prz.tu-berlin.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 153603597
Organization: ADP Claims Solutions Group
Newsgroups: news.software.readers