From c3b845152c823bc31f60703a838901a8d12de420 Mon Sep 17 00:00:00 2001 From: sthen Date: Sat, 10 Oct 2009 10:48:49 +0000 Subject: [PATCH] avoid some dumb resolv.conf parsing --- databases/lbdb/Makefile | 6 ++-- databases/lbdb/patches/patch-lbdb_lib_sh_in | 39 +++++++++++++++------ 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/databases/lbdb/Makefile b/databases/lbdb/Makefile index 85c25af7ee4..f317f9a5acb 100644 --- a/databases/lbdb/Makefile +++ b/databases/lbdb/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2009/08/07 19:43:36 naddy Exp $ +# $OpenBSD: Makefile,v 1.8 2009/10/10 10:48:49 sthen Exp $ COMMENT-main = little brother's database, email address query tools COMMENT-ldap = LDAP support for little brother's database @@ -7,8 +7,8 @@ VERSION = 0.36 DISTNAME = lbdb_${VERSION} # bump all subpackages together -PKGNAME-main = lbdb-${VERSION}p3 -PKGNAME-ldap = lbdb-ldap-${VERSION}p3 +PKGNAME-main = lbdb-${VERSION}p4 +PKGNAME-ldap = lbdb-ldap-${VERSION}p4 CATEGORIES = databases mail diff --git a/databases/lbdb/patches/patch-lbdb_lib_sh_in b/databases/lbdb/patches/patch-lbdb_lib_sh_in index 3c6128eed83..d0308799058 100644 --- a/databases/lbdb/patches/patch-lbdb_lib_sh_in +++ b/databases/lbdb/patches/patch-lbdb_lib_sh_in @@ -1,12 +1,29 @@ -$OpenBSD: patch-lbdb_lib_sh_in,v 1.1.1.1 2008/06/15 07:22:57 sthen Exp $ ---- lbdb_lib.sh.in.orig Tue Mar 11 22:51:11 2008 -+++ lbdb_lib.sh.in Tue Mar 11 22:51:37 2008 -@@ -67,7 +67,7 @@ lbdb_hostname() - if test "x$hn" = "x" ; then - hn=`lbdb_hn_sendmail` - if test "x$hn" = "xNONE" ; then +$OpenBSD: patch-lbdb_lib_sh_in,v 1.2 2009/10/10 10:48:49 sthen Exp $ +--- lbdb_lib.sh.in.orig Sun Aug 13 10:53:21 2006 ++++ lbdb_lib.sh.in Sat Oct 10 03:10:21 2009 +@@ -57,24 +57,7 @@ lbdb_hostname() + elif test -f /etc/mailname; then + hn=`cat /etc/mailname` + else +- hn="" +- if test -r /etc/resolv.conf ; then +- hn="`sed -n -e 's/^[ ]*domain[ ]\{1,\}\([^ ]*\)/\1/p' /etc/resolv.conf`" +- if test "x$hn" = "x" ; then +- hn="`sed -n -e 's/^[ ]*search[ ]\{1,\}\([^ ]*\)/\1/p' /etc/resolv.conf`" +- fi +- fi +- if test "x$hn" = "x" ; then +- hn=`lbdb_hn_sendmail` +- if test "x$hn" = "xNONE" ; then - for i in /etc/HOSTNAME /etc/hostname ; do -+ for i in /etc/myname /etc/HOSTNAME /etc/hostname ; do - if test -f $i ; then - hn="`cat $i`" - break; +- if test -f $i ; then +- hn="`cat $i`" +- break; +- fi +- done +- fi +- fi ++ hn=`hostname` + fi + echo "$hn" + }