diff options
author | scrappy <scrappy@FreeBSD.org> | 2006-09-04 14:57:49 +0800 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 2006-09-04 14:57:49 +0800 |
commit | b3bfc05eb89e68fc174ad82b7ebaf3b7796bf4b2 (patch) | |
tree | 4a94c7150857c6f78356a38f7da16fd458f3466d | |
parent | 26b2f82d0620a6ff3aefbf44d3474c138d991c46 (diff) | |
download | freebsd-ports-gnome-b3bfc05eb89e68fc174ad82b7ebaf3b7796bf4b2.tar.gz freebsd-ports-gnome-b3bfc05eb89e68fc174ad82b7ebaf3b7796bf4b2.tar.zst freebsd-ports-gnome-b3bfc05eb89e68fc174ad82b7ebaf3b7796bf4b2.zip |
forgot to 'cvs add' pkg-install
Submitted by: Paul Lipps <paul.lipps@gmail.com>
-rw-r--r-- | sysutils/bsdstats/Makefile | 1 | ||||
-rw-r--r-- | sysutils/bsdstats/pkg-install | 46 |
2 files changed, 47 insertions, 0 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile index a392cccffd31..daf773937e7a 100644 --- a/sysutils/bsdstats/Makefile +++ b/sysutils/bsdstats/Makefile @@ -7,6 +7,7 @@ PORTNAME= bsdstats PORTVERSION= 3.3 +PORTREVISION= 1 CATEGORIES= sysutils DISTFILES= diff --git a/sysutils/bsdstats/pkg-install b/sysutils/bsdstats/pkg-install new file mode 100644 index 000000000000..b8010e533c47 --- /dev/null +++ b/sysutils/bsdstats/pkg-install @@ -0,0 +1,46 @@ +#!/bin/sh +# +# pkg-install : based off /usr/ports/mail/courier/files/pkg-install.in +# + +ask() { + local question default answer + + question=$1 + default=$2 + if [ -z "${PACKAGE_BUILDING}" ]; then + read -p "${question} [${default}]? " answer + fi + if [ -z "${answer}" ]; then + answer=${default} + fi + echo ${answer} +} + +yesno() { + local question default answer + + question=$1 + default=$2 + while :; do + answer=$(ask "${question}" "${default}") + case "${answer}" in + [Yy]*) return 0;; + [Nn]*) return 1;; + esac + echo "Please answer yes or no." + done +} + +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 + fi + fi +fi + |