diff options
author | scrappy <scrappy@FreeBSD.org> | 2007-10-16 12:34:49 +0800 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 2007-10-16 12:34:49 +0800 |
commit | c936e7fa6aa9f16277b3bf45369d62dc0e5aec00 (patch) | |
tree | f5cf29e3027d27bb53c0613eedf91f87965702a7 /sysutils/bsdstats | |
parent | 2e1c36d5afea794466cc5688bd7f88266f0f41d6 (diff) | |
download | freebsd-ports-gnome-c936e7fa6aa9f16277b3bf45369d62dc0e5aec00.tar.gz freebsd-ports-gnome-c936e7fa6aa9f16277b3bf45369d62dc0e5aec00.tar.zst freebsd-ports-gnome-c936e7fa6aa9f16277b3bf45369d62dc0e5aec00.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 ...
Diffstat (limited to 'sysutils/bsdstats')
-rw-r--r-- | sysutils/bsdstats/Makefile | 2 | ||||
-rw-r--r-- | sysutils/bsdstats/files/300.statistics | 56 | ||||
-rw-r--r-- | sysutils/bsdstats/files/300.statistics.in | 56 |
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 ;; *) |