[PC-BSD Commits] r1427 - pcbsd/trunk/system-overlay/usr/local/etc/periodic/monthly

svn at pcbsd.org svn at pcbsd.org
Fri Feb 22 06:42:28 PST 2008


Author: kris
Date: 2008-02-22 06:42:28 -0800 (Fri, 22 Feb 2008)
New Revision: 1427

Modified:
   pcbsd/trunk/system-overlay/usr/local/etc/periodic/monthly/300.statistics
Log:

Updated the bsdstats script to the latest version in ports



Modified: pcbsd/trunk/system-overlay/usr/local/etc/periodic/monthly/300.statistics
===================================================================
--- pcbsd/trunk/system-overlay/usr/local/etc/periodic/monthly/300.statistics	2008-02-22 14:33:54 UTC (rev 1426)
+++ pcbsd/trunk/system-overlay/usr/local/etc/periodic/monthly/300.statistics	2008-02-22 14:42:28 UTC (rev 1427)
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-# $FreeBSD: ports/sysutils/bsdstats/files/300.statistics,v 1.38 2006/12/05 13:49:45 scrappy Exp $
+# $FreeBSD: ports/sysutils/bsdstats/files/300.statistics,v 1.40 2007/12/20 04:36:39 scrappy Exp $
 #
 
 # If there is a global system configuration file, suck it in.
@@ -22,7 +22,7 @@
 oldmask=$(umask)
 umask 066
 
-version="5.2"
+version="5.4"
 checkin_server=${monthly_statistics_checkin_server:-"rpt.bsdstats.org"}
 bsdstats_log=${monthly_statistics_logfile:-"/var/log/bsdstats"}
 id_token_file='/var/db/bsdstats'
@@ -397,8 +397,7 @@
 case "$monthly_statistics_enable" in
     [Yy][Ee][Ss])
       check_dns
-      HN=`/bin/hostname`
-      REL=`/usr/local/bin/PBReg get /PC-BSD/Version`
+      REL="/usr/local/bin/PBReg get /PC-BSD/Version"
       ARCH=`/usr/bin/uname -m`
       OS="PC-BSD"
       get_id_token
@@ -406,32 +405,34 @@
       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
       ;;
     *) 



More information about the Commits mailing list