summaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorscrappy <scrappy@FreeBSD.org>2006-09-04 22:40:56 +0000
committerscrappy <scrappy@FreeBSD.org>2006-09-04 22:40:56 +0000
commitafefa7d44eab70b697d11643a8b604f2f34e8eff (patch)
treee61e7311a6908ffbe75b1e7f0c5eb2a38c4a1503 /sysutils
parentffd0ba6cd6ad093ddd1effb6596d61e67fbabd47 (diff)
downloadFreeBSD-ports-afefa7d44eab70b697d11643a8b604f2f34e8eff.zip
FreeBSD-ports-afefa7d44eab70b697d11643a8b604f2f34e8eff.tar.gz
temporarily broke get_id function
Submitted by: David Brownlee <abs@absd.org>
Diffstat (limited to 'sysutils')
-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 51f1491..0ea8076 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 b323e0f..3036ef9 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 442d743..76cac2f 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
}
OpenPOWER on IntegriCloud