aboutsummaryrefslogtreecommitdiff
path: root/sysutils/bsdstats
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2006-09-09 16:45:36 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2006-09-09 16:45:36 +0000
commitcb2b9a562ac60130dbc1039b5b92e2b006814b40 (patch)
tree3581f3258da2ccd38639f4d310467f2efa25deff /sysutils/bsdstats
parent23d10b8deb3321e02c303cafef130d20d04e9fd2 (diff)
downloadports-cb2b9a562ac60130dbc1039b5b92e2b006814b40.tar.gz
ports-cb2b9a562ac60130dbc1039b5b92e2b006814b40.zip
Notes
Diffstat (limited to 'sysutils/bsdstats')
-rw-r--r--sysutils/bsdstats/Makefile2
-rw-r--r--sysutils/bsdstats/files/300.statistics32
-rw-r--r--sysutils/bsdstats/files/300.statistics.in32
3 files changed, 43 insertions, 23 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index 4a234d73c086..9182a14e551a 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= bsdstats
-PORTVERSION= 3.8
+PORTVERSION= 3.9
CATEGORIES= sysutils
DISTFILES=
diff --git a/sysutils/bsdstats/files/300.statistics b/sysutils/bsdstats/files/300.statistics
index 01fe68e8289e..08f1ba55a178 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.21 2006-09-07 04:50:21 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.22 2006-09-09 16:45:36 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -9,8 +9,14 @@ if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
+ periodic_conf=/etc/periodic.conf
else
. /etc/rc.conf # For systems without periodic.conf, use rc.conf
+ if [ -r /etc/rc.conf.local ]
+ then
+ . /etc/rc.conf.local
+ fi
+ periodic_conf=/etc/rc.conf.local
fi
oldmask=$(umask)
@@ -33,10 +39,7 @@ random () {
send_devices () {
case $(uname) in
- NetBSD | OpenBSD)
- # Not supported
- ;;
- FreeBSD | *)
+ FreeBSD )
for line in `/usr/sbin/pciconf -l | /usr/bin/grep -v none`
do
DRIVER=`echo $line | awk -F\@ '{print $1}'`
@@ -47,6 +50,9 @@ send_devices () {
do_fetch report_devices.php?key=$KEY$query_string
;;
+ * )
+ # Not supported
+ ;;
esac
}
@@ -56,8 +62,8 @@ get_id_token () {
IDTOKEN=$(uri_escape $( openssl rand -base64 16 ) )
idf=$( mktemp "$id_token_file.XXXXXX" ) && \
- /usr/sbin/chown root:wheel $idf && \
- /bin/chmod 600 $idf
+ chown root:wheel $idf && \
+ chmod 600 $idf
do_fetch getid.php?key=$IDTOKEN | {
local IFS
@@ -126,8 +132,12 @@ do_fetch () {
url="http://$checkin_server/scripts/$1"
sleep `random`
case $(uname) in
- NetBSD | OpenBSD) /usr/bin/ftp -V -o - "$url" ;;
- FreeBSD | *) /usr/bin/fetch -q -o - "$url" ;;
+ FreeBSD )
+ /usr/bin/fetch -q -o - "$url"
+ ;;
+ * )
+ /usr/bin/ftp -V -o - "$url"
+ ;;
esac
}
@@ -154,13 +164,13 @@ case "$monthly_statistics_enable" in
;;
*)
echo "Posting monthly device/CPU statistics disabled"
- echo ' set monthly_statistics_report_devices="YES" in /etc/periodic.conf'
+ echo ' set monthly_statistics_report_devices="YES" in $periodic_conf'
;;
esac
;;
*)
echo "Posting monthly OS statistics disabled"
- echo ' set monthly_statistics_enable="YES" in /etc/periodic.conf'
+ echo ' set monthly_statistics_enable="YES" in $periodic_conf'
;;
esac
diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in
index b721113b4f2f..e5811a352b64 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.21 2006-09-07 04:50:21 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.22 2006-09-09 16:45:36 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -9,8 +9,14 @@ if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
+ periodic_conf=/etc/periodic.conf
else
. /etc/rc.conf # For systems without periodic.conf, use rc.conf
+ if [ -r /etc/rc.conf.local ]
+ then
+ . /etc/rc.conf.local
+ fi
+ periodic_conf=/etc/rc.conf.local
fi
oldmask=$(umask)
@@ -33,10 +39,7 @@ random () {
send_devices () {
case $(uname) in
- NetBSD | OpenBSD)
- # Not supported
- ;;
- FreeBSD | *)
+ FreeBSD )
for line in `/usr/sbin/pciconf -l | /usr/bin/grep -v none`
do
DRIVER=`echo $line | awk -F\@ '{print $1}'`
@@ -47,6 +50,9 @@ send_devices () {
do_fetch report_devices.php?key=$KEY$query_string
;;
+ * )
+ # Not supported
+ ;;
esac
}
@@ -56,8 +62,8 @@ get_id_token () {
IDTOKEN=$(uri_escape $( openssl rand -base64 16 ) )
idf=$( mktemp "$id_token_file.XXXXXX" ) && \
- /usr/sbin/chown root:wheel $idf && \
- /bin/chmod 600 $idf
+ chown root:wheel $idf && \
+ chmod 600 $idf
do_fetch getid.php?key=$IDTOKEN | {
local IFS
@@ -126,8 +132,12 @@ do_fetch () {
url="http://$checkin_server/scripts/$1"
sleep `random`
case $(uname) in
- NetBSD | OpenBSD) /usr/bin/ftp -V -o - "$url" ;;
- FreeBSD | *) /usr/bin/fetch -q -o - "$url" ;;
+ FreeBSD )
+ /usr/bin/fetch -q -o - "$url"
+ ;;
+ * )
+ /usr/bin/ftp -V -o - "$url"
+ ;;
esac
}
@@ -154,13 +164,13 @@ case "$monthly_statistics_enable" in
;;
*)
echo "Posting monthly device/CPU statistics disabled"
- echo ' set monthly_statistics_report_devices="YES" in /etc/periodic.conf'
+ echo ' set monthly_statistics_report_devices="YES" in $periodic_conf'
;;
esac
;;
*)
echo "Posting monthly OS statistics disabled"
- echo ' set monthly_statistics_enable="YES" in /etc/periodic.conf'
+ echo ' set monthly_statistics_enable="YES" in $periodic_conf'
;;
esac