aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/bsdstats
diff options
context:
space:
mode:
authorscrappy <scrappy@FreeBSD.org>2006-09-05 06:40:56 +0800
committerscrappy <scrappy@FreeBSD.org>2006-09-05 06:40:56 +0800
commitafefa7d44eab70b697d11643a8b604f2f34e8eff (patch)
treee61e7311a6908ffbe75b1e7f0c5eb2a38c4a1503 /sysutils/bsdstats
parentffd0ba6cd6ad093ddd1effb6596d61e67fbabd47 (diff)
downloadfreebsd-ports-gnome-afefa7d44eab70b697d11643a8b604f2f34e8eff.tar.gz
freebsd-ports-gnome-afefa7d44eab70b697d11643a8b604f2f34e8eff.tar.zst
freebsd-ports-gnome-afefa7d44eab70b697d11643a8b604f2f34e8eff.zip
temporarily broke get_id function
Submitted by: David Brownlee <abs@absd.org>
Diffstat (limited to 'sysutils/bsdstats')
-rw-r--r--sysutils/bsdstats/Makefile1
-rw-r--r--sysutils/bsdstats/files/300.statistics39
-rw-r--r--sysutils/bsdstats/files/300.statistics.in39
3 files changed, 51 insertions, 28 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index 51f1491a97c5..0ea8076ad47c 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -7,6 +7,7 @@
PORTNAME= bsdstats
PORTVERSION= 3.4
+PORTREVISION= 1
CATEGORIES= sysutils
DISTFILES=
diff --git a/sysutils/bsdstats/files/300.statistics b/sysutils/bsdstats/files/300.statistics
index b323e0f9732b..3036ef957efd 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.16 2006-09-04 20:36:44 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.17 2006-09-04 22:40:56 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -26,15 +26,22 @@ IFS="
"
send_devices () {
- for line in `/usr/sbin/pciconf -l | /usr/bin/grep -v none`
- do
- DRIVER=`echo $line | awk -F\@ '{print $1}'`
- DEV=`echo $line | awk '{print $4}' | cut -c8-15`
- CLASS=`echo $line | awk '{print $2}' | cut -c9-14`
- query_string=$query_string`echo \&dev[]=$DRIVER:$DEV:$CLASS`
- done
-
- do_fetch report_devices.php?key=$KEY$query_string
+ case $(uname) in
+ NetBSD)
+ # Not supported
+ ;;
+ FreeBSD | *)
+ for line in `/usr/sbin/pciconf -l | /usr/bin/grep -v none`
+ do
+ DRIVER=`echo $line | awk -F\@ '{print $1}'`
+ DEV=`echo $line | awk '{print $4}' | cut -c8-15`
+ CLASS=`echo $line | awk '{print $2}' | cut -c9-14`
+ query_string=$query_string`echo \&dev[]=$DRIVER:$DEV:$CLASS`
+ done
+
+ do_fetch report_devices.php?key=$KEY$query_string
+ ;;
+ esac
}
get_id_token () {
@@ -67,6 +74,11 @@ get_id_token () {
} > $idf && \
mv $idf $id_token_file
+ if [ ! -s $id_token_file ] ;
+ then
+ echo "Nothing returned from $checkin_server"
+ exit 1
+ fi
echo "To protect against abuse, the initial challenge/response phase"
echo "contains a 15 minute pause. Please be patient while this time"
@@ -105,11 +117,10 @@ uri_escape () {
}
do_fetch () {
+ url="http://$checkin_server/scripts/$1"
case $(uname) in
- NetBSD)
- /usr/bin/ftp -V -o /dev/null "http://$checkin_server/scripts/$1" ;;
- FreeBSD | *)
- /usr/bin/fetch -qo /dev/null "http://$checkin_server/scripts/$1" ;;
+ NetBSD) /usr/bin/ftp -V -o - "$url" ;;
+ FreeBSD | *) /usr/bin/fetch -q -o - "$url" ;;
esac
}
diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in
index 442d74363558..76cac2f59104 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.16 2006-09-04 20:36:44 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.17 2006-09-04 22:40:56 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -26,15 +26,22 @@ IFS="
"
send_devices () {
- for line in `/usr/sbin/pciconf -l | /usr/bin/grep -v none`
- do
- DRIVER=`echo $line | awk -F\@ '{print $1}'`
- DEV=`echo $line | awk '{print $4}' | cut -c8-15`
- CLASS=`echo $line | awk '{print $2}' | cut -c9-14`
- query_string=$query_string`echo \&dev[]=$DRIVER:$DEV:$CLASS`
- done
-
- do_fetch report_devices.php?key=$KEY$query_string
+ case $(uname) in
+ NetBSD)
+ # Not supported
+ ;;
+ FreeBSD | *)
+ for line in `/usr/sbin/pciconf -l | /usr/bin/grep -v none`
+ do
+ DRIVER=`echo $line | awk -F\@ '{print $1}'`
+ DEV=`echo $line | awk '{print $4}' | cut -c8-15`
+ CLASS=`echo $line | awk '{print $2}' | cut -c9-14`
+ query_string=$query_string`echo \&dev[]=$DRIVER:$DEV:$CLASS`
+ done
+
+ do_fetch report_devices.php?key=$KEY$query_string
+ ;;
+ esac
}
get_id_token () {
@@ -67,6 +74,11 @@ get_id_token () {
} > $idf && \
mv $idf $id_token_file
+ if [ ! -s $id_token_file ] ;
+ then
+ echo "Nothing returned from $checkin_server"
+ exit 1
+ fi
echo "To protect against abuse, the initial challenge/response phase"
echo "contains a 15 minute pause. Please be patient while this time"
@@ -105,11 +117,10 @@ uri_escape () {
}
do_fetch () {
+ url="http://$checkin_server/scripts/$1"
case $(uname) in
- NetBSD)
- /usr/bin/ftp -V -o /dev/null "http://$checkin_server/scripts/$1" ;;
- FreeBSD | *)
- /usr/bin/fetch -qo /dev/null "http://$checkin_server/scripts/$1" ;;
+ NetBSD) /usr/bin/ftp -V -o - "$url" ;;
+ FreeBSD | *) /usr/bin/fetch -q -o - "$url" ;;
esac
}