summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2006-09-28 18:21:51 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2006-09-28 18:21:51 +0000
commitffd59295eec2944de3ac27b34d7e1304f067a08a (patch)
tree97930156bc995441d237202b56be4c3d32ac43a9 /sysutils
parentfix the code a bit to allow for setting the checkin_server to something (diff)
Add a network connectivity check using dns
Notes
Notes: svn path=/head/; revision=174049
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/bsdstats/Makefile2
-rw-r--r--sysutils/bsdstats/files/300.statistics10
-rw-r--r--sysutils/bsdstats/files/300.statistics.in10
3 files changed, 19 insertions, 3 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index b4076107cddd..0630a58a0904 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= bsdstats
-PORTVERSION= 3.10
+PORTVERSION= 3.11
CATEGORIES= sysutils
DISTFILES=
diff --git a/sysutils/bsdstats/files/300.statistics b/sysutils/bsdstats/files/300.statistics
index c7ddac39b0f5..b8e4e0803bad 100644
--- a/sysutils/bsdstats/files/300.statistics
+++ b/sysutils/bsdstats/files/300.statistics
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.23 2006-09-28 18:00:04 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.24 2006-09-28 18:21:51 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -142,9 +142,17 @@ do_fetch () {
esac
}
+check_dns () {
+ if [ `dig bsdstats.org txt | grep TXT | grep UP | wc -l` = 0 ]
+ then
+ echo "DNS not reachable, Network Down?"
+ exit
+ fi
+}
case "$monthly_statistics_enable" in
[Yy][Ee][Ss])
+ check_dns
HN=`/bin/hostname`
REL=`/usr/bin/uname -r`
ARCH=`/usr/bin/uname -m`
diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in
index 149934f82458..7f364ecfac2e 100644
--- a/sysutils/bsdstats/files/300.statistics.in
+++ b/sysutils/bsdstats/files/300.statistics.in
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.23 2006-09-28 18:00:04 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.24 2006-09-28 18:21:51 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -142,9 +142,17 @@ do_fetch () {
esac
}
+check_dns () {
+ if [ `dig bsdstats.org txt | grep TXT | grep UP | wc -l` = 0 ]
+ then
+ echo "DNS not reachable, Network Down?"
+ exit
+ fi
+}
case "$monthly_statistics_enable" in
[Yy][Ee][Ss])
+ check_dns
HN=`/bin/hostname`
REL=`/usr/bin/uname -r`
ARCH=`/usr/bin/uname -m`