diff options
author | scrappy <scrappy@FreeBSD.org> | 2006-10-08 08:39:29 +0800 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 2006-10-08 08:39:29 +0800 |
commit | bc1894a18be8751d16ff7149917d31dd47e38407 (patch) | |
tree | db939524ab4d47c587459d40ac61bc059aa31759 /sysutils/bsdstats | |
parent | 7dbed280499f1cff5b096751ec4403d8183e01f3 (diff) | |
download | freebsd-ports-gnome-bc1894a18be8751d16ff7149917d31dd47e38407.tar.gz freebsd-ports-gnome-bc1894a18be8751d16ff7149917d31dd47e38407.tar.zst freebsd-ports-gnome-bc1894a18be8751d16ff7149917d31dd47e38407.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 ...
Diffstat (limited to 'sysutils/bsdstats')
-rw-r--r-- | sysutils/bsdstats/Makefile | 1 | ||||
-rw-r--r-- | sysutils/bsdstats/pkg-install | 16 |
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 |