diff options
author | Marc G. Fournier <scrappy@FreeBSD.org> | 2006-08-09 16:21:30 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@FreeBSD.org> | 2006-08-09 16:21:30 +0000 |
commit | 45f855e33e792d602ec0a0904113cc9989aaf037 (patch) | |
tree | b0b7051d0120b42edffa98044add9fa2f5382454 /sysutils | |
parent | c0784d7adb0bf630ed326f054ad5c1c1f60e347f (diff) |
Notes
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/bsdstats/Makefile | 1 | ||||
-rw-r--r-- | sysutils/bsdstats/files/300.statistics | 16 | ||||
-rw-r--r-- | sysutils/bsdstats/files/300.statistics.in | 16 |
3 files changed, 29 insertions, 4 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile index de3d6cb13faa..34673cc8d251 100644 --- a/sysutils/bsdstats/Makefile +++ b/sysutils/bsdstats/Makefile @@ -7,6 +7,7 @@ PORTNAME= bsdstats PORTVERSION= 2.1 +PORTREVISION= 1 CATEGORIES= sysutils DISTFILES= diff --git a/sysutils/bsdstats/files/300.statistics b/sysutils/bsdstats/files/300.statistics index 0ec444ad12a1..301c487fd209 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.7 2006-08-09 02:37:09 scrappy Exp $ +# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.8 2006-08-09 16:21:30 scrappy Exp $ # # If there is a global system configuration file, suck it in. @@ -34,9 +34,10 @@ uri_escape () { } do_fetch () { - /usr/bin/fetch -qo /dev/null "http://bsdstats.hub.org/scripts/$1" + /usr/bin/fetch -qo /dev/null "http://$checkin_server/scripts/$1" } +checkin_server="bsdstats.hub.org"; case "$monthly_statistics_enable" in [Yy][Ee][Ss]) @@ -44,6 +45,7 @@ case "$monthly_statistics_enable" in SYS=`/usr/bin/uname -r` ARCH=`/usr/bin/uname -m` do_fetch getid.php?hn=$HN\&sys=$SYS\&arch=$ARCH\&opsys=$OS + echo "Posting monthly OS statistics to $checkin_server" case "$monthly_statistics_report_devices" in [Yy][Ee][Ss]) IFS=" @@ -57,6 +59,7 @@ IFS=" DEV=`echo $line | awk '{print $4}' | cut -c8-11` do_fetch report_device.php?driver=$DRIVER\&vendor=$VEN\&device=$DEV\&hn=$HN done + echo "Posting monthly device statistics to $checkin_server" line=$( sysctl -n hw.model ) VEN=$( echo $line | cut -d ' ' -f 1 ) @@ -69,10 +72,19 @@ IFS=" do_fetch report_cpu.php?cpu_id=CPU$n\&vendor=$VEN\&cpu_type=$DEV\&hn=$HN n=$(( $n + 1 )) done + echo "Posting monthly CPU statistics to $checkin_server" ;; + *) + echo "Posting monthly device/CPU statistics disabled" + echo " set monthly_statistics_report_devices=yes in /etc/periodic.conf" + ;; esac ;; + *) + echo "Posting monthly OS statistics disabled" + echo " set monthly_statistics_enable=yes in /etc/periodic.conf" + ;; esac umask $oldmask diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in index b52a348c96cf..fdcb0b3c0037 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.7 2006-08-09 02:37:09 scrappy Exp $ +# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.8 2006-08-09 16:21:30 scrappy Exp $ # # If there is a global system configuration file, suck it in. @@ -34,9 +34,10 @@ uri_escape () { } do_fetch () { - /usr/bin/fetch -qo /dev/null "http://bsdstats.hub.org/scripts/$1" + /usr/bin/fetch -qo /dev/null "http://$checkin_server/scripts/$1" } +checkin_server="bsdstats.hub.org"; case "$monthly_statistics_enable" in [Yy][Ee][Ss]) @@ -44,6 +45,7 @@ case "$monthly_statistics_enable" in SYS=`/usr/bin/uname -r` ARCH=`/usr/bin/uname -m` do_fetch getid.php?hn=$HN\&sys=$SYS\&arch=$ARCH\&opsys=$OS + echo "Posting monthly OS statistics to $checkin_server" case "$monthly_statistics_report_devices" in [Yy][Ee][Ss]) IFS=" @@ -57,6 +59,7 @@ IFS=" DEV=`echo $line | awk '{print $4}' | cut -c8-11` do_fetch report_device.php?driver=$DRIVER\&vendor=$VEN\&device=$DEV\&hn=$HN done + echo "Posting monthly device statistics to $checkin_server" line=$( sysctl -n hw.model ) VEN=$( echo $line | cut -d ' ' -f 1 ) @@ -69,10 +72,19 @@ IFS=" do_fetch report_cpu.php?cpu_id=CPU$n\&vendor=$VEN\&cpu_type=$DEV\&hn=$HN n=$(( $n + 1 )) done + echo "Posting monthly CPU statistics to $checkin_server" ;; + *) + echo "Posting monthly device/CPU statistics disabled" + echo " set monthly_statistics_report_devices=yes in /etc/periodic.conf" + ;; esac ;; + *) + echo "Posting monthly OS statistics disabled" + echo " set monthly_statistics_enable=yes in /etc/periodic.conf" + ;; esac umask $oldmask |