Index: head/sysutils/bsdstats/Makefile =================================================================== --- head/sysutils/bsdstats/Makefile (revision 191077) +++ head/sysutils/bsdstats/Makefile (revision 191078) @@ -1,45 +1,45 @@ # New ports collection makefile for: bsdstats # Date created: 5 August 2006 # Whom: Marc G. Fournier # # $FreeBSD$ # PORTNAME= bsdstats PORTVERSION= 5.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils DISTFILES= MAINTAINER= scrappy@freebsd.org COMMENT= Monthly script for reporting anonymous statistics about your machine .include .if ${OSVERSION} < 503102 || (${OSVERSION} >= 600000 && ${OSVERSION} < 600010) RUN_DEPENDS= nc:${PORTSDIR}/net/netcat .endif NO_BUILD= yes PLIST_FILES= etc/periodic/monthly/300.statistics etc/rc.d/bsdstats.sh PLIST_DIRS= etc/periodic/monthly \ etc/periodic do-install: ${MKDIR} ${LOCALBASE}/etc/periodic/monthly ${CP} ${FILESDIR}/300.statistics ${LOCALBASE}/etc/periodic/monthly ${CP} ${FILESDIR}/bsdstats.sh ${LOCALBASE}/etc/rc.d ${CHMOD} 0755 ${LOCALBASE}/etc/rc.d/bsdstats.sh post-install: ${CAT} ${PKGMESSAGE} .if defined(BATCH) || defined(PACKAGE_BUILDING) @${ECHO_MSG} " To activate monthly statistics reporting in /etc/periodic.conf," @${ECHO_MSG} " execute the following as root user:" @${ECHO_MSG} @${ECHO_MSG} "PKG_PREFIX=\"${PREFIX}\" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL" @${ECHO_MSG} .else @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif .include Property changes on: head/sysutils/bsdstats/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.48 \ No newline at end of property +1.49 \ No newline at end of property Index: head/sysutils/bsdstats/files/pkg-message.in =================================================================== --- head/sysutils/bsdstats/files/pkg-message.in (revision 191077) +++ head/sysutils/bsdstats/files/pkg-message.in (revision 191078) @@ -1,28 +1,31 @@ This script, meant to be run monthly, submits statistics anonymously to a central checkin server (http://bsdstats.org), in an attempt to generate reasonably accurate demographics of both *BSD usage, as well as devices in use. Steps have been taken to make eliminate security concerns brought up in earlier releases of this, including, but not limited to, not storing anything in the database that has been deemed as 'sensitive' (ie. IP of the reporting server, and hostname). ******************** -To enable the port, edit or create /etc/periodic.conf and add this line: +To enable monthly reporting, edit or create /etc/periodic.conf and add this line: monthly_statistics_enable="YES" + +To enable boottime reporting, edit or create /etc/rc.conf and add this line: + bsdstats_enable="YES" To enable device reporting, add this line: monthly_statistics_report_devices="YES" To enable ports reporting, add this line: monthly_statistics_report_ports="YES" To run it manually the first time, just run it as: /usr/local/etc/periodic/monthly/300.statistics -nodelay To view current statistics, go to: http://www.bsdstats.org ******************** Property changes on: head/sysutils/bsdstats/files/pkg-message.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property Index: head/sysutils/bsdstats/pkg-install =================================================================== --- head/sysutils/bsdstats/pkg-install (revision 191077) +++ head/sysutils/bsdstats/pkg-install (revision 191078) @@ -1,77 +1,68 @@ #!/bin/sh # # pkg-install : based off /usr/ports/mail/courier/files/pkg-install.in # ask() { local question default answer question=$1 default=$2 if [ -z "${PACKAGE_BUILDING}" ]; then read -p "${question} [${default}]? " answer fi if [ -z "${answer}" ]; then answer=${default} fi echo ${answer} } yesno() { local question default answer question=$1 default=$2 while :; do answer=$(ask "${question}" "${default}") case "${answer}" in [Yy]*) return 0;; [Nn]*) return 1;; esac echo "Please answer yes or no." done } if [ ":$2" = ":POST-INSTALL" ]; then if [ -f "/etc/periodic.conf" ]; then if [ `grep monthly_statistics /etc/periodic.conf | wc -l` = 0 ]; then if yesno "Would you like to activate monthly reporting in /etc/periodic.conf" n; then echo "monthly_statistics_enable=\"YES\"" >> /etc/periodic.conf + echo "bsdstats_enable=\"YES\"" >> /etc/rc.conf if yesno "Would you like to send a list of installed hardware as well" n; then echo "monthly_statistics_report_devices=\"YES\"" >> /etc/periodic.conf fi if yesno "Would you like to send a list of installed ports as well" n; then echo "monthly_statistics_report_ports=\"YES\"" >> /etc/periodic.conf fi if yesno "Would you like to run it now" y; then /usr/local/etc/periodic/monthly/300.statistics -nodelay fi fi fi elif [ ! -f "/etc/periodic.conf" ]; then if yesno "Would you like to activate monthly reporting in /etc/periodic.conf" n; then echo "monthly_statistics_enable=\"YES\"" >> /etc/periodic.conf + echo "bsdstats_enable=\"YES\"" >> /etc/rc.conf if yesno "Would you like to send a list of installed hardware as well" n; then echo "monthly_statistics_report_devices=\"YES\"" >> /etc/periodic.conf fi if yesno "Would you like to send a list of installed ports as well" n; then echo "monthly_statistics_report_ports=\"YES\"" >> /etc/periodic.conf fi if yesno "Would you like to run it now" y; then /usr/local/etc/periodic/monthly/300.statistics -nodelay fi - fi - fi - if [ -f "/etc/rc.conf" ]; then - if [ `grep bsdstats_enable /etc/rc.conf | wc -l` = 0 ]; then - if yesno "Would you like to activate reporting on reboot in /etc/rc.conf" n; then - echo "bsdstats_enable=\"YES\"" >> /etc/rc.conf - fi - fi - elif [ ! -f "/etc/periodic.conf" ]; then - if yesno "Would you like to activate reporting on reboot in /etc/rc.conf" n; then - echo "bsdstats_enable=\"YES\"" >> /etc/rc.conf fi fi fi Property changes on: head/sysutils/bsdstats/pkg-install ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.6 \ No newline at end of property +1.7 \ No newline at end of property Index: head/sysutils/bsdstats/pkg-message =================================================================== --- head/sysutils/bsdstats/pkg-message (revision 191077) +++ head/sysutils/bsdstats/pkg-message (revision 191078) @@ -1,28 +1,31 @@ This script, meant to be run monthly, submits statistics anonymously to a central checkin server (http://bsdstats.org), in an attempt to generate reasonably accurate demographics of both *BSD usage, as well as devices in use. Steps have been taken to make eliminate security concerns brought up in earlier releases of this, including, but not limited to, not storing anything in the database that has been deemed as 'sensitive' (ie. IP of the reporting server, and hostname). ******************** -To enable the port, edit or create /etc/periodic.conf and add this line: +To enable monthly reporting, edit or create /etc/periodic.conf and add this line: monthly_statistics_enable="YES" + +To enable boottime reporting, edit or create /etc/rc.conf and add this line: + bsdstats_enable="YES" To enable device reporting, add this line: monthly_statistics_report_devices="YES" To enable ports reporting, add this line: monthly_statistics_report_ports="YES" To run it manually the first time, just run it as: /usr/local/etc/periodic/monthly/300.statistics -nodelay To view current statistics, go to: http://www.bsdstats.org ******************** Property changes on: head/sysutils/bsdstats/pkg-message ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property