aboutsummaryrefslogtreecommitdiff
path: root/sysutils/bsdstats
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2006-08-14 13:08:01 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2006-08-14 13:08:01 +0000
commitd60b7dd874a9b70519c7ae04cd3c723c95ec5ef5 (patch)
tree0d7a1135aa4c919598f2e876d297208e47ead878 /sysutils/bsdstats
parentfb284f56c95a3ad51224c09ff15904bd5dbb0473 (diff)
downloadports-d60b7dd874a9b70519c7ae04cd3c723c95ec5ef5.tar.gz
ports-d60b7dd874a9b70519c7ae04cd3c723c95ec5ef5.zip
Notes
Diffstat (limited to 'sysutils/bsdstats')
-rw-r--r--sysutils/bsdstats/Makefile1
-rw-r--r--sysutils/bsdstats/files/300.statistics34
-rw-r--r--sysutils/bsdstats/files/300.statistics.in34
3 files changed, 61 insertions, 8 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index a4580149c1e3..ec5394905910 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -7,6 +7,7 @@
PORTNAME= bsdstats
PORTVERSION= 3.0
+PORTREVISION= 1
CATEGORIES= sysutils
DISTFILES=
diff --git a/sysutils/bsdstats/files/300.statistics b/sysutils/bsdstats/files/300.statistics
index 303e3807b99f..0bc1cd2b07b6 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.11 2006-08-14 07:35:09 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.12 2006-08-14 13:08:01 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -33,12 +33,38 @@ send_devices () {
}
get_id_token () {
+ local IFS
+
+ IFS='=
+'
+
if [ ! -f $id_token_file ] ;
then
IDTOKEN=$( /usr/bin/openssl rand -base64 16 )
- /usr/bin/fetch -qo $id_token_file "http://$checkin_server/scripts/getid.php?key=$IDTOKEN"
- /usr/sbin/chown root:wheel $id_token_file
- /bin/chmod 600 $id_token_file
+
+ idf=$( mktemp "$id_token_file.XXXXXX" ) && \
+ /usr/sbin/chown root:wheel $id_token_file && \
+ /bin/chmod 600 $id_token_file && \
+
+ /usr/bin/fetch -qo - \
+ "http://$checkin_server/scripts/getid.php?key=$IDTOKEN" | {
+ while read var val
+ do
+ case $var in
+ KEY)
+ echo "KEY=$val"
+ ;;
+ TOKEN)
+ echo "TOKEN=$val"
+ ;;
+ *)
+ ;;
+ esac
+ done
+ } > $idf && \
+
+ mv $idf $id_token_file
+
echo "To protect against abuse, the initial challenge/response phase"
echo "contains a 15 minute pause. Please be patient while this time"
echo "limit elapses"
diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in
index 9a7a7be5992b..07eb7326c384 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.11 2006-08-14 07:35:09 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.12 2006-08-14 13:08:01 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -33,12 +33,38 @@ send_devices () {
}
get_id_token () {
+ local IFS
+
+ IFS='=
+'
+
if [ ! -f $id_token_file ] ;
then
IDTOKEN=$( /usr/bin/openssl rand -base64 16 )
- /usr/bin/fetch -qo $id_token_file "http://$checkin_server/scripts/getid.php?key=$IDTOKEN"
- /usr/sbin/chown root:wheel $id_token_file
- /bin/chmod 600 $id_token_file
+
+ idf=$( mktemp "$id_token_file.XXXXXX" ) && \
+ /usr/sbin/chown root:wheel $id_token_file && \
+ /bin/chmod 600 $id_token_file && \
+
+ /usr/bin/fetch -qo - \
+ "http://$checkin_server/scripts/getid.php?key=$IDTOKEN" | {
+ while read var val
+ do
+ case $var in
+ KEY)
+ echo "KEY=$val"
+ ;;
+ TOKEN)
+ echo "TOKEN=$val"
+ ;;
+ *)
+ ;;
+ esac
+ done
+ } > $idf && \
+
+ mv $idf $id_token_file
+
echo "To protect against abuse, the initial challenge/response phase"
echo "contains a 15 minute pause. Please be patient while this time"
echo "limit elapses"