aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2007-10-16 04:34:49 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2007-10-16 04:34:49 +0000
commit5f578bbd6fef7d36e1e8584146236e59b06d502e (patch)
treef206563f26f273c580f273360d61aeffe6a3e72f /sysutils
parent77bbe47f35ad1d774c3c98a787040b7ae6096d88 (diff)
downloadports-5f578bbd6fef7d36e1e8584146236e59b06d502e.tar.gz
ports-5f578bbd6fef7d36e1e8584146236e59b06d502e.zip
The point of bsdstats is to be as painless as possible, but also to be
run monthly ... change the behaviour such that when it is run with the -nodelay option, it *only* reports the operating system, even if both devices and ports reporting are also enabled ... ... this when, when run as part of the original port install, *or* on system reboot if enabled in /etc/rc.conf, it is 'quick n painless', and we get the critical number we are looking for ...
Notes
Notes: svn path=/head/; revision=201543
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/bsdstats/Makefile2
-rw-r--r--sysutils/bsdstats/files/300.statistics56
-rw-r--r--sysutils/bsdstats/files/300.statistics.in56
3 files changed, 59 insertions, 55 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index 949caf9dc331..6cf78c891f62 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -7,7 +7,7 @@
PORTNAME= bsdstats
PORTVERSION= 5.3
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= sysutils
DISTFILES=
diff --git a/sysutils/bsdstats/files/300.statistics b/sysutils/bsdstats/files/300.statistics
index c6869568b071..c7c0bc5b27b4 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.38 2006-12-05 13:49:45 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.39 2007-10-16 04:34:49 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -406,32 +406,34 @@ case "$monthly_statistics_enable" in
enable_token
report_system
echo "Posting monthly OS statistics to $checkin_server"
- case "$monthly_statistics_report_devices" in
- [Yy][Ee][Ss])
- send_devices
- echo "Posting monthly device statistics to $checkin_server"
- line=$( sysctl -n hw.model )
- VEN=$( echo $line | cut -d ' ' -f 1 )
- DEV=$( uri_escape $( echo $line | cut -d ' ' -f 2- ) )
- count=$( sysctl -n hw.ncpu )
- report_cpu
- echo "Posting monthly CPU statistics to $checkin_server"
- ;;
- *)
- echo "Posting monthly device/CPU statistics disabled"
- echo " set monthly_statistics_report_devices=\"YES\" in $periodic_conf"
- ;;
- esac
- case "$monthly_statistics_report_ports" in
- [Yy][Ee][Ss])
- send_ports
- echo "Posting monthly ports statistics to $checkin_server"
- ;;
- *)
- echo "Posting monthly ports statistics disabled"
- echo " set monthly_statistics_report_ports=\"YES\" in $periodic_conf"
- ;;
- esac
+ if [ X"$1" != X-nodelay ]; then
+ case "$monthly_statistics_report_devices" in
+ [Yy][Ee][Ss])
+ send_devices
+ echo "Posting monthly device statistics to $checkin_server"
+ line=$( sysctl -n hw.model )
+ VEN=$( echo $line | cut -d ' ' -f 1 )
+ DEV=$( uri_escape $( echo $line | cut -d ' ' -f 2- ) )
+ count=$( sysctl -n hw.ncpu )
+ report_cpu
+ echo "Posting monthly CPU statistics to $checkin_server"
+ ;;
+ *)
+ echo "Posting monthly device/CPU statistics disabled"
+ echo " set monthly_statistics_report_devices=\"YES\" in $periodic_conf"
+ ;;
+ esac
+ case "$monthly_statistics_report_ports" in
+ [Yy][Ee][Ss])
+ send_ports
+ echo "Posting monthly ports statistics to $checkin_server"
+ ;;
+ *)
+ echo "Posting monthly ports statistics disabled"
+ echo " set monthly_statistics_report_ports=\"YES\" in $periodic_conf"
+ ;;
+ esac
+ fi
disable_token
;;
*)
diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in
index d218f986e30b..a1ed194e508c 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.38 2006-12-05 13:49:45 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.39 2007-10-16 04:34:49 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -406,32 +406,34 @@ case "$monthly_statistics_enable" in
enable_token
report_system
echo "Posting monthly OS statistics to $checkin_server"
- case "$monthly_statistics_report_devices" in
- [Yy][Ee][Ss])
- send_devices
- echo "Posting monthly device statistics to $checkin_server"
- line=$( sysctl -n hw.model )
- VEN=$( echo $line | cut -d ' ' -f 1 )
- DEV=$( uri_escape $( echo $line | cut -d ' ' -f 2- ) )
- count=$( sysctl -n hw.ncpu )
- report_cpu
- echo "Posting monthly CPU statistics to $checkin_server"
- ;;
- *)
- echo "Posting monthly device/CPU statistics disabled"
- echo " set monthly_statistics_report_devices=\"YES\" in $periodic_conf"
- ;;
- esac
- case "$monthly_statistics_report_ports" in
- [Yy][Ee][Ss])
- send_ports
- echo "Posting monthly ports statistics to $checkin_server"
- ;;
- *)
- echo "Posting monthly ports statistics disabled"
- echo " set monthly_statistics_report_ports=\"YES\" in $periodic_conf"
- ;;
- esac
+ if [ X"$1" != X-nodelay ]; then
+ case "$monthly_statistics_report_devices" in
+ [Yy][Ee][Ss])
+ send_devices
+ echo "Posting monthly device statistics to $checkin_server"
+ line=$( sysctl -n hw.model )
+ VEN=$( echo $line | cut -d ' ' -f 1 )
+ DEV=$( uri_escape $( echo $line | cut -d ' ' -f 2- ) )
+ count=$( sysctl -n hw.ncpu )
+ report_cpu
+ echo "Posting monthly CPU statistics to $checkin_server"
+ ;;
+ *)
+ echo "Posting monthly device/CPU statistics disabled"
+ echo " set monthly_statistics_report_devices=\"YES\" in $periodic_conf"
+ ;;
+ esac
+ case "$monthly_statistics_report_ports" in
+ [Yy][Ee][Ss])
+ send_ports
+ echo "Posting monthly ports statistics to $checkin_server"
+ ;;
+ *)
+ echo "Posting monthly ports statistics disabled"
+ echo " set monthly_statistics_report_ports=\"YES\" in $periodic_conf"
+ ;;
+ esac
+ fi
disable_token
;;
*)