diff options
author | wennmach <wennmach> | 2001-02-08 14:01:59 +0000 |
---|---|---|
committer | wennmach <wennmach> | 2001-02-08 14:01:59 +0000 |
commit | 61870aec51919ff6661273d32bafd89a4160a543 (patch) | |
tree | 90eb0da845282b1fe070f3d55c9c6eb9581d410b /misc | |
parent | a8fd5cb17ab2c3985a3e0c7f95698f07e35597a3 (diff) | |
download | pkgsrc-61870aec51919ff6661273d32bafd89a4160a543.tar.gz |
Avoid the use of the `host' program to determine the fully qualified host
name. This may caused problems on some machines with non-standard network
setup.
Pointed out by Jon Buller and by Dan MacMahill.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/jitterbug/Makefile | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/misc/jitterbug/Makefile b/misc/jitterbug/Makefile index 9a7f56be437..0927c9cde28 100644 --- a/misc/jitterbug/Makefile +++ b/misc/jitterbug/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2001/01/29 11:34:34 wiz Exp $ +# $NetBSD: Makefile,v 1.15 2001/02/08 14:01:59 wennmach Exp $ DISTNAME= jitterbug-1.6.2 WRKSRC= ${WRKDIR}/${PKGNAME}/source @@ -26,13 +26,6 @@ CGIBINDIR= libexec/cgi-bin .include "../../mk/bsd.prefs.mk" -HOSTCMD= /usr/bin/false -.if exists(/usr/sbin/host) -HOSTCMD= /usr/sbin/host -.elif exists(/usr/bin/host) -HOSTCMD= /usr/bin/host -.endif - JB_PACKAGE?= test JB_USER?= jitter @@ -46,13 +39,10 @@ JB_CONFIGDIR= ${JB_USER}/config JB_LOCALMAIL?= ${JB_PACKAGE}-bugs +JB_HOSTNAME= `hostname -s` +JB_LONGNAME= `hostname` .if !defined(JB_FQHOSTNAME) -JB_TMP!= ${HOSTCMD} `/bin/hostname` 2>/dev/null -.if (${JB_TMP} == "") -JB_FQHOSTNAME="totally.unknown.domain" -.else -JB_FQHOSTNAME!= echo ${JB_TMP} | /usr/bin/awk '{ print $$1; exit}' -.endif +JB_FQHOSTNAME= ${JB_LONGNAME} .endif JB_EMAIL?= ${JB_LOCALMAIL}@${JB_FQHOSTNAME} @@ -64,13 +54,14 @@ MESSAGE_SUBST+= JB_USER=${JB_USER} \ JB_LOCALMAIL=${JB_LOCALMAIL} pre-extract: -.if ${JB_FQHOSTNAME} == "totally.unknown.domain" - @${ECHO} - @${ECHO} "Warning: could not determine your fully qualified host" - @${ECHO} " name. Please set the JB_FQHOSTNAME environment" - @${ECHO} " variable accordingly and/or fix your name server." - @${ECHO} " Building for domain 'totally.unknown.domain'" -.endif + @(if [ "X${JB_HOSTNAME}" = "X${JB_LONGNAME}" ]; then \ + ${ECHO}; \ + ${ECHO} "Warning: could not determine your fully qualified host"; \ + ${ECHO} " name. Please set the JB_FQHOSTNAME environment"; \ + ${ECHO} " variable or set the correct fully qualified"; \ + ${ECHO} " domain name in ${PREFIX}/${JB_CONFIGDIR}/jitterbug.config"; \ + ${ECHO} " after installation."; \ + fi) .if ${JB_PACKAGE} == "test" @${ECHO} @${ECHO} "You should define the JB_PACKAGE environment variable:" |