aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/bsdstats/pkg-install
diff options
context:
space:
mode:
authorscrappy <scrappy@FreeBSD.org>2007-10-16 12:24:33 +0800
committerscrappy <scrappy@FreeBSD.org>2007-10-16 12:24:33 +0800
commit2e1c36d5afea794466cc5688bd7f88266f0f41d6 (patch)
tree55bece9b4ab8e8c54e6152c0469a02d8152112df /sysutils/bsdstats/pkg-install
parent9ab69c42a8eecce0d659c88c73de7096c53c685b (diff)
downloadfreebsd-ports-gnome-2e1c36d5afea794466cc5688bd7f88266f0f41d6.tar.gz
freebsd-ports-gnome-2e1c36d5afea794466cc5688bd7f88266f0f41d6.tar.zst
freebsd-ports-gnome-2e1c36d5afea794466cc5688bd7f88266f0f41d6.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 ...
Diffstat (limited to 'sysutils/bsdstats/pkg-install')
-rw-r--r--sysutils/bsdstats/pkg-install33
1 files changed, 25 insertions, 8 deletions
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