aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorscrappy <scrappy@FreeBSD.org>2006-08-07 11:35:39 +0800
committerscrappy <scrappy@FreeBSD.org>2006-08-07 11:35:39 +0800
commit3cd42c7ddee58e6b63467a09db69c1c171de1d60 (patch)
tree56b5d1ff9060504174440962fc007e416f458abe /sysutils
parent2e4933ee249024fd3ea03ed44ac399b4029e4aa5 (diff)
downloadfreebsd-ports-gnome-3cd42c7ddee58e6b63467a09db69c1c171de1d60.tar.gz
freebsd-ports-gnome-3cd42c7ddee58e6b63467a09db69c1c171de1d60.tar.zst
freebsd-ports-gnome-3cd42c7ddee58e6b63467a09db69c1c171de1d60.zip
bsdstats v2.0 ... device reporting
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/bsdstats/Makefile3
-rw-r--r--sysutils/bsdstats/files/300.statistics21
-rw-r--r--sysutils/bsdstats/files/300.statistics.in21
-rw-r--r--sysutils/bsdstats/files/pkg-message.in3
-rw-r--r--sysutils/bsdstats/pkg-message3
5 files changed, 41 insertions, 10 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index 13df6de2fc41..175df5e494e2 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= bsdstats
-PORTVERSION= 1.0
-PORTREVISION= 1
+PORTVERSION= 2.0
CATEGORIES= sysutils
DISTFILES=
diff --git a/sysutils/bsdstats/files/300.statistics b/sysutils/bsdstats/files/300.statistics
index 22d8a2027f74..33b2d8601745 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.2 2006-08-06 14:11:15 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.3 2006-08-07 03:35:39 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -20,10 +20,23 @@ case "$monthly_statistics_enable" in
HN=`/bin/hostname`
SYS=`/usr/bin/uname -r`
ARCH=`/usr/bin/uname -m`
- OS=`/usr/bin/uname -s`
- /usr/bin/fetch -qo /tmp/getid http://bsdstats.hub.org/scripts/getid.php?hn=$HN\&sys=$SYS\&arch=$ARCH\&opsys=$OS
+ /usr/bin/fetch -qo /tmp/getid http://bsdstats.hub.org/scripts/getid.php?hn=$HN\&sys=$SYS\&arch=$ARCH
+ case "$monthly_statistics_report_devices" in
+ [Yy][Ee][Ss])
+IFS="
+"
+
+ /usr/bin/fetch -qo /tmp/result http://bsdstats.hub.org/scripts/clear_devices.php?hn=$HN
+ for line in `/usr/sbin/pciconf -l | /usr/bin/grep -v none`
+ do
+ DRIVER=`echo $line | awk -F\@ '{print $1}'`
+ VEN=`echo $line | awk '{print $4}' | cut -c12-15`
+ DEV=`echo $line | awk '{print $4}' | cut -c8-11`
+ /usr/bin/fetch -qo /tmp/result http://bsdstats.hub.org/scripts/report_device.php?driver=$DRIVER\&vendor=$VEN\&device=$DEV\&hn=$HN
+ done
+ ;;
+ esac
;;
- *) rc=0;;
esac
umask $oldmask
diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in
index 39cf4669d13d..bf52ded5c7ab 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.2 2006-08-06 14:11:15 scrappy Exp $
+# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.3 2006-08-07 03:35:39 scrappy Exp $
#
# If there is a global system configuration file, suck it in.
@@ -20,10 +20,23 @@ case "$monthly_statistics_enable" in
HN=`/bin/hostname`
SYS=`/usr/bin/uname -r`
ARCH=`/usr/bin/uname -m`
- OS=`/usr/bin/uname -s`
- /usr/bin/fetch -qo /tmp/getid http://bsdstats.hub.org/scripts/getid.php?hn=$HN\&sys=$SYS\&arch=$ARCH\&opsys=$OS
+ /usr/bin/fetch -qo /tmp/getid http://bsdstats.hub.org/scripts/getid.php?hn=$HN\&sys=$SYS\&arch=$ARCH
+ case "$monthly_statistics_report_devices" in
+ [Yy][Ee][Ss])
+IFS="
+"
+
+ /usr/bin/fetch -qo /tmp/result http://bsdstats.hub.org/scripts/clear_devices.php?hn=$HN
+ for line in `/usr/sbin/pciconf -l | /usr/bin/grep -v none`
+ do
+ DRIVER=`echo $line | awk -F\@ '{print $1}'`
+ VEN=`echo $line | awk '{print $4}' | cut -c12-15`
+ DEV=`echo $line | awk '{print $4}' | cut -c8-11`
+ /usr/bin/fetch -qo /tmp/result http://bsdstats.hub.org/scripts/report_device.php?driver=$DRIVER\&vendor=$VEN\&device=$DEV\&hn=$HN
+ done
+ ;;
+ esac
;;
- *) rc=0;;
esac
umask $oldmask
diff --git a/sysutils/bsdstats/files/pkg-message.in b/sysutils/bsdstats/files/pkg-message.in
index 639b8b405814..9c103e76f5c2 100644
--- a/sysutils/bsdstats/files/pkg-message.in
+++ b/sysutils/bsdstats/files/pkg-message.in
@@ -3,6 +3,9 @@
To enable the port, edit or create /etc/periodic.conf and add this line:
monthly_statistics_enable=yes
+To enable device reporting, add this line:
+ monthly_statistics_report_devices=yes
+
To run it manually the first time, just run it as:
/usr/local/etc/periodic/monthly/300.statistics
********************
diff --git a/sysutils/bsdstats/pkg-message b/sysutils/bsdstats/pkg-message
index 639b8b405814..9c103e76f5c2 100644
--- a/sysutils/bsdstats/pkg-message
+++ b/sysutils/bsdstats/pkg-message
@@ -3,6 +3,9 @@
To enable the port, edit or create /etc/periodic.conf and add this line:
monthly_statistics_enable=yes
+To enable device reporting, add this line:
+ monthly_statistics_report_devices=yes
+
To run it manually the first time, just run it as:
/usr/local/etc/periodic/monthly/300.statistics
********************