diff options
author | sketch <sketch@pkgsrc.org> | 2009-01-14 12:20:57 +0000 |
---|---|---|
committer | sketch <sketch@pkgsrc.org> | 2009-01-14 12:20:57 +0000 |
commit | 16f14133b69de5a1e061a538cd67952e531bd776 (patch) | |
tree | 13b0a31dd106b21cf73981c7c772775ccad07583 /net/mrtg | |
parent | e3b90140c144befcdacb7c5886fb4612adf2e053 (diff) | |
download | pkgsrc-16f14133b69de5a1e061a538cd67952e531bd776.tar.gz |
Get rid of `hostname -s` in pkgsrc, on Solaris it sets the hostname to "-s".
Diffstat (limited to 'net/mrtg')
-rw-r--r-- | net/mrtg/Makefile | 3 | ||||
-rwxr-xr-x | net/mrtg/files/envstat2mrtg | 5 | ||||
-rw-r--r-- | net/mrtg/files/sys2mrtg | 8 |
3 files changed, 10 insertions, 6 deletions
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); |