aboutsummaryrefslogtreecommitdiff
path: root/sysutils/bsdstats
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2007-10-16 04:24:33 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2007-10-16 04:24:33 +0000
commit77bbe47f35ad1d774c3c98a787040b7ae6096d88 (patch)
tree2cd68e1b0b1e8f68b847e69fa015eddc77a6742a /sysutils/bsdstats
parent109572887b9620c9dd8012b5d7f05136e952275a (diff)
downloadports-77bbe47f35ad1d774c3c98a787040b7ae6096d88.tar.gz
ports-77bbe47f35ad1d774c3c98a787040b7ae6096d88.zip
As per discussion on -advocacy, resurrect having the installer prompted
if they want to enable it in /etc/rc.conf, instead of making it automatic. Put a message explaining that for desktop/laptop environments, enabling in /etc/rc.conf is recommended ...
Notes
Notes: svn path=/head/; revision=201542
Diffstat (limited to 'sysutils/bsdstats')
-rw-r--r--sysutils/bsdstats/Makefile2
-rw-r--r--sysutils/bsdstats/pkg-install33
2 files changed, 26 insertions, 9 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index 2597c73332ef..949caf9dc331 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -7,7 +7,7 @@
PORTNAME= bsdstats
PORTVERSION= 5.3
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= sysutils
DISTFILES=
diff --git a/sysutils/bsdstats/pkg-install b/sysutils/bsdstats/pkg-install
index 1b05fa7b3e99..8a46c24f0d31 100644
--- a/sysutils/bsdstats/pkg-install
+++ b/sysutils/bsdstats/pkg-install
@@ -37,7 +37,6 @@ if [ ":$2" = ":POST-INSTALL" ]; 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
@@ -48,17 +47,10 @@ if [ ":$2" = ":POST-INSTALL" ]; then
${PKG_PREFIX}/etc/periodic/monthly/300.statistics -nodelay
fi
fi
- else
- if [ `grep 'monthly_statistics_enable="YES"' /etc/periodic.conf | wc -l` = 1 ]; then
- if [ `grep 'bsdstats_enable="YES"' /etc/rc.conf | wc -l` = 0 ]; then
- echo "bsdstats_enable=\"YES\"" >> /etc/rc.conf
- 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
@@ -70,5 +62,30 @@ if [ ":$2" = ":POST-INSTALL" ]; then
fi
fi
fi
+ if [ -f "/etc/rc.conf" ]; then
+ if [ `grep bsdstats_enable /etc/rc.conf | wc -l` = 0 ]; then
+ echo ""
+ echo "If running as a desktop, or on a laptop, it is recommended that you"
+ echo "enable bsdstats within /etc/rc.conf, so that it will run on reboot."
+ echo ""
+ echo "This will ensure that even if your computer is off when monthly runs,"
+ echo "your computer will be properly counted."
+ echo ""
+ 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/rc.conf" ]; then
+ echo ""
+ echo "If running as a desktop, or on a laptop, it is recommended that you"
+ echo "enable bsdstats within /etc/rc.conf, so that it will run on reboot."
+ echo ""
+ echo "This will ensure that even if your computer is off when monthly runs,"
+ echo "your computer will be properly counted."
+ echo ""
+ 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