ports/178531: [PATCH] sysutils/munin-master: remove interactive questions from pkg-install and pkg-deinstall
Claudius Herder
claudius_herder at ambtec.de
Sun May 12 13:20:01 UTC 2013
>Number: 178531
>Category: ports
>Synopsis: [PATCH] sysutils/munin-master: remove interactive questions from pkg-install and pkg-deinstall
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun May 12 13:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Claudius Herder
>Release: FreeBSD 9.1-STABLE FreeBSD 9.1-STABLE #1 r250556: Sun May 12 11:38:33 CEST
>Organization:
>Environment:
>Description:
I would like to see the interactive questions removed from munin-master. Answering the same questions with every update is quite annoying and forces commands like portmaster -af to wait for userinput everytime
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
===> Updating from SVN
Updating '.':
At revision 317952.
===> Generating patch
===> Viewing diff with more
Index: pkg-deinstall
===================================================================
--- pkg-deinstall (revision 317952)
+++ pkg-deinstall (working copy)
@@ -1,34 +1,5 @@
#! /bin/sh
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
delete_crontab_entries() {
local b e
b=$1
@@ -63,10 +34,9 @@
exit 0
elif [ "$ENTRY" = "$DEFAULT" ]; then
delnewsyslog
- elif yesno "You have changed the default munin-master entry in \"/etc/newsyslog.conf\".
-Do you want me to delete it?" y; then
- delnewsyslog
- echo "Done."
+ else
+ echo "You have changed the default munin-master entry in \"/etc/newsyslog.conf\"".
+ echo "If you deinstall munin-master permanently, you have to manually remove it"
fi
}
Index: pkg-install
===================================================================
--- pkg-install (revision 317952)
+++ pkg-install (working copy)
@@ -1,34 +1,5 @@
#! /bin/sh
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
create_crontab_entries() {
local b e
b=$1
===> Done
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list