aboutsummaryrefslogtreecommitdiff
path: root/sysutils/bsdstats
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2006-10-08 00:39:29 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2006-10-08 00:39:29 +0000
commitd116ebec62b5c78296e260bd6a6401efe4d72c3c (patch)
tree748c7c8b52383a161740bff1b0512d64adf78d33 /sysutils/bsdstats
parentdc37b8e043c97cee23f9cf144002d756495c6663 (diff)
downloadports-d116ebec62b5c78296e260bd6a6401efe4d72c3c.tar.gz
ports-d116ebec62b5c78296e260bd6a6401efe4d72c3c.zip
Make pkg-install a bit smarter ... if the questions have already been
answered in /etc/periodic.conf, don't ask them again, just print out the message ... Better for unattended port upgrades ...
Notes
Notes: svn path=/head/; revision=174882
Diffstat (limited to 'sysutils/bsdstats')
-rw-r--r--sysutils/bsdstats/Makefile1
-rw-r--r--sysutils/bsdstats/pkg-install16
2 files changed, 10 insertions, 7 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index a75ca313a41e..69114a8ea02d 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -7,6 +7,7 @@
PORTNAME= bsdstats
PORTVERSION= 4.8
+PORTREVISION= 1
CATEGORIES= sysutils
DISTFILES=
diff --git a/sysutils/bsdstats/pkg-install b/sysutils/bsdstats/pkg-install
index b8010e533c47..f4e5450de907 100644
--- a/sysutils/bsdstats/pkg-install
+++ b/sysutils/bsdstats/pkg-install
@@ -33,13 +33,15 @@ yesno() {
}
if [ ":$2" = ":POST-INSTALL" ]; then
- if yesno "Would you like to activate monthly reporting in /etc/periodic.conf" n; then
- echo "monthly_statistics_enable=\"YES\"" >> /etc/periodic.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 run it now" y; then
- /usr/local/etc/periodic/monthly/300.statistics
+ 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
+ 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 run it now" y; then
+ /usr/local/etc/periodic/monthly/300.statistics
+ fi
fi
fi
fi