summaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorscrappy <scrappy@FreeBSD.org>2006-08-09 16:21:30 +0000
committerscrappy <scrappy@FreeBSD.org>2006-08-09 16:21:30 +0000
commit05d2b2804787c38c7cfb9d059d9f49bb3515596f (patch)
tree9200739d048aaf1a44f8f4223ee92e551f2297bb /sysutils
parent94ddf910761adc64b5ad2980cf101f61c00de4d8 (diff)
downloadFreeBSD-ports-05d2b2804787c38c7cfb9d059d9f49bb3515596f.zip
FreeBSD-ports-05d2b2804787c38c7cfb9d059d9f49bb3515596f.tar.gz
Add some verbosity to the script, letting ppl know that a report has
been sent, and/or that it is disabled and how to enable it ... Submitted by: Paul Schmehl <pauls@utdallas.edu>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/bsdstats/Makefile1
-rw-r--r--sysutils/bsdstats/files/300.statistics16
-rw-r--r--sysutils/bsdstats/files/300.statistics.in16
3 files changed, 29 insertions, 4 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index de3d6cb..34673cc 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 0ec444a..301c487 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 b52a348..fdcb0b3 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
OpenPOWER on IntegriCloud