summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsketch <sketch>2009-01-14 12:20:57 +0000
committersketch <sketch>2009-01-14 12:20:57 +0000
commit6563af10677d7d2e4919315bd5eb5a2a13d9b3d2 (patch)
tree13b0a31dd106b21cf73981c7c772775ccad07583
parentd57f6279c8054b4c8aa0dd2299a4eb0edf861e49 (diff)
downloadpkgsrc-6563af10677d7d2e4919315bd5eb5a2a13d9b3d2.tar.gz
Get rid of `hostname -s` in pkgsrc, on Solaris it sets the hostname to "-s".
-rw-r--r--benchmarks/hbench/Makefile13
-rw-r--r--mail/exmh/files/build4
-rw-r--r--misc/jitterbug/Makefile12
-rw-r--r--net/mrtg/Makefile3
-rwxr-xr-xnet/mrtg/files/envstat2mrtg5
-rw-r--r--net/mrtg/files/sys2mrtg8
6 files changed, 27 insertions, 18 deletions
diff --git a/benchmarks/hbench/Makefile b/benchmarks/hbench/Makefile
index c3eb74cd0b9..8cb0cc68151 100644
--- a/benchmarks/hbench/Makefile
+++ b/benchmarks/hbench/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2008/04/05 14:09:18 chris Exp $
+# $NetBSD: Makefile,v 1.41 2009/01/14 12:20:57 sketch Exp $
DISTNAME= hbench-OS-1.0
PKGNAME= hbench-1.0
@@ -26,6 +26,11 @@ GET_ARCH_CMD= ${PKGSRCDIR:Q}/mk/gnu-config/config.guess | ${SED} -e 's/-.*-.*$$
GET_OS_CMD= ${PKGSRCDIR:Q}/mk/gnu-config/config.guess | ${SED} -e 's/^.*-.*-//'
PLIST_SUBST+= PLATFORM=${GET_OS_CMD:sh:Q}-${GET_ARCH_CMD:sh:Q}
+.include "../../mk/bsd.prefs.mk"
+
+HB_HOSTNAME!= ${UNAME} -n
+HB_SHORTNAME= ${HB_HOSTNAME:C/\..*//}
+
post-extract:
${CP} ${FILESDIR}/do-install ${WRKSRC}
@@ -48,12 +53,12 @@ benchmark:
${MKDIR} conf; \
${MKDIR} results; \
${SED} -e 's|@pwd@|'`/bin/pwd`'|g' \
- -e 's|@hostname@|'`/bin/hostname -s`'|g' \
+ -e 's|@hostname@|${HB_SHORTNAME}|g' \
-e 's|@wrksrc@|'`/bin/pwd`'|g' \
${FILESDIR}/setup.answers | ${MAKE} setup; \
- ${MV} conf/`/bin/hostname -s`.run conf/foo ; \
+ ${MV} conf/${HB_SHORTNAME}.run conf/foo ; \
${SED} -e 's|#PLAINBINDIR=${HBENCHROOT}|PLAINBINDIR='`/bin/pwd`'|' \
- < conf/foo > conf/`/bin/hostname -s`.run ; \
+ < conf/foo > conf/${HB_SHORTNAME}.run ; \
${MAKE} run
results:
diff --git a/mail/exmh/files/build b/mail/exmh/files/build
index 992651a4b63..3d458ca2896 100644
--- a/mail/exmh/files/build
+++ b/mail/exmh/files/build
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $NetBSD: build,v 1.2 2006/10/20 08:15:15 dsainty Exp $
+# $NetBSD: build,v 1.3 2009/01/14 12:20:57 sketch Exp $
# FreeBSD Id: build,v 1.5 1997/08/21 08:09:56 peter Exp
#
@@ -29,7 +29,7 @@ fi
if [ -d ${PREFIX}/share/faces ]; then
FACES=${PREFIX}/share/faces #dir
- shortname="`hostname -s`"
+ shortname="`hostname | sed -e 's/\..*//'`"
domain="`hostname | sed -e s/^${shortname}// -e s/^.// | tr A-Z a-z`"
if [ "${domain}" != "" ]; then
DOMAIN="{${domain}}"
diff --git a/misc/jitterbug/Makefile b/misc/jitterbug/Makefile
index 90c098651ff..317113244f1 100644
--- a/misc/jitterbug/Makefile
+++ b/misc/jitterbug/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.31 2008/06/16 14:39:35 joerg Exp $
+# $NetBSD: Makefile,v 1.32 2009/01/14 12:20:57 sketch Exp $
DISTNAME= jitterbug-1.6.2
PKGREVISION= 2
@@ -29,10 +29,10 @@ JB_CONFIGDIR= ${JB_USER}/config
JB_LOCALMAIL?= ${JB_PACKAGE}-bugs
-JB_HOSTNAME= `hostname -s`
-JB_LONGNAME= `hostname`
+JB_HOSTNAME!= ${UNAME} -n
+JB_SHORTNAME= ${JB_HOSTNAME:C/\..*//}
.if !defined(JB_FQHOSTNAME)
-JB_FQHOSTNAME= ${JB_LONGNAME}
+JB_FQHOSTNAME= ${JB_HOSTNAME}
.endif
JB_EMAIL?= ${JB_LOCALMAIL}@${JB_FQHOSTNAME}
@@ -64,7 +64,7 @@ FILES_SUBST+= JB_USER=${JB_USER} JB_USERID=${JB_USERID} \
CHGRP=${CHGRP} ID=${ID} TOUCH=${TOUCH} RM=${RM}
pre-extract:
- @(if [ "X${JB_HOSTNAME}" = "X${JB_LONGNAME}" ]; then \
+ @(if [ "X${JB_HOSTNAME}" = "X${JB_SHORTNAME}" ]; then \
${ECHO}; \
${ECHO} "Warning: could not determine your fully qualified host"; \
${ECHO} " name. Please set the JB_FQHOSTNAME environment"; \
@@ -96,7 +96,7 @@ pre-extract:
@${ECHO} " (default='${JB_LOCALMAIL}@${JB_FQHOSTNAME}')"
@${ECHO}
.endif
-.if ${JB_FQHOSTNAME} == ${JB_HOSTNAME}
+.if ${JB_FQHOSTNAME} == ${JB_SHORTNAME}
@${ECHO} "Warning: Could not determine your fully qualified hostname."
@${ECHO} "You must set the JB_FQHOSTNAME environment variable."
@${ECHO}
diff --git a/net/mrtg/Makefile b/net/mrtg/Makefile
index e025a916099..4520da62320 100644
--- a/net/mrtg/Makefile
+++ b/net/mrtg/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.89 2008/08/10 16:50:56 adrianp Exp $
+# $NetBSD: Makefile,v 1.90 2009/01/14 12:20:57 sketch Exp $
DISTNAME= mrtg-2.16.2
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= http://oss.oetiker.ch/mrtg/pub/ \
http://oss.oetiker.ch/mrtg/pub/old/
diff --git a/net/mrtg/files/envstat2mrtg b/net/mrtg/files/envstat2mrtg
index 21d542737c6..17f95a0984f 100755
--- a/net/mrtg/files/envstat2mrtg
+++ b/net/mrtg/files/envstat2mrtg
@@ -1,5 +1,5 @@
#! @PREFIX@/bin/perl
-# $NetBSD: envstat2mrtg,v 1.2 2005/06/23 08:12:13 martti Exp $
+# $NetBSD: envstat2mrtg,v 1.3 2009/01/14 12:20:57 sketch Exp $
if (@ARGV == 1)
{
@@ -63,9 +63,10 @@ sub end
}
}
close(UP);
- open(HOST, "hostname -s|");
+ open(HOST, "hostname|");
while (<HOST>)
{
+ s/\..*//;
print $_;
}
exit(0);
diff --git a/net/mrtg/files/sys2mrtg b/net/mrtg/files/sys2mrtg
index a965a0129c7..5411fc4d431 100644
--- a/net/mrtg/files/sys2mrtg
+++ b/net/mrtg/files/sys2mrtg
@@ -1,5 +1,5 @@
#! @PREFIX@/bin/perl
-# $NetBSD: sys2mrtg,v 1.3 2001/06/19 12:32:18 hubertf Exp $
+# $NetBSD: sys2mrtg,v 1.4 2009/01/14 12:20:57 sketch Exp $
if (@ARGV < 1)
@@ -112,9 +112,10 @@ if ($cmd eq load)
}
}
close(UP);
- open(HOST, "hostname -s|");
+ open(HOST, "hostname|");
while (<HOST>)
{
+ s/\..*//;
print $_;
}
close(HOST);
@@ -181,9 +182,10 @@ sub uptime
sub end
{
&uptime;
- open(HOST, "hostname -s|");
+ open(HOST, "hostname|");
while (<HOST>)
{
+ s/\..*//;
print $_;
}
exit(0);