From bc1894a18be8751d16ff7149917d31dd47e38407 Mon Sep 17 00:00:00 2001 From: scrappy Date: Sun, 8 Oct 2006 00:39:29 +0000 Subject: 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 ... --- sysutils/bsdstats/Makefile | 1 + sysutils/bsdstats/pkg-install | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'sysutils/bsdstats') 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 -- cgit