aboutsummaryrefslogtreecommitdiff
path: root/release/packages
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2017-08-10 12:30:34 +0000
committerGlen Barber <gjb@FreeBSD.org>2017-08-10 12:30:34 +0000
commit65fbf6644d387e01e81ba5ad8484d12be359969a (patch)
treec246d8d0b8f86972c9dd2abd464d7737432daec5 /release/packages
parentfb1cf2a9e5ac616baf281791d965ad477e48ede7 (diff)
downloadsrc-65fbf6644d387e01e81ba5ad8484d12be359969a.tar.gz
src-65fbf6644d387e01e81ba5ad8484d12be359969a.zip
Revise part of r322327 in release/packages/kernel.ucl.
It appears I misunderstand process forking and signal handling in how the pre-/post-install scripts are executed internally by pkg(8). In some cases (not all), ^C when prompted to cancel the kernel package update will stop the pre-install script from executing, but allow pkg(8) to continue extracting the package when it is not the intent. In order to keep somewhat of an anti-footshooting measure in place, print the recommendation to install the kernel package first if ASSUME_ALWAYS_YES is false and TERM is set, then sleep for 5 seconds to allow the user to see the message. MFC after: 5 days MFC with: r322327 X-MFC-Note: Maybe not until I am happy with this.. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=322352
Diffstat (limited to 'release/packages')
-rw-r--r--release/packages/kernel.ucl14
1 files changed, 4 insertions, 10 deletions
diff --git a/release/packages/kernel.ucl b/release/packages/kernel.ucl
index 67d7bf53db5d..4edf5657ffd3 100644
--- a/release/packages/kernel.ucl
+++ b/release/packages/kernel.ucl
@@ -25,6 +25,9 @@ scripts: {
continue
;;
esac
+ if [ -z "${TERM}" ]; then
+ exit 0
+ fi
echo "****************************************************************"
echo "It is recommended to install the FreeBSD-%PKGNAME% package"
echo "with:"
@@ -37,16 +40,7 @@ scripts: {
echo " pkg upgrade"
echo
echo "****************************************************************"
- echo
- echo "Do you want to continue anyway?"
- echo "[Enter] to continue, ^C to cancel."
- echo
- read ANSWER
- case ${ANSWER} in
- *)
- continue
- ;;
- esac
+ sleep 5
EOD
post-install = <<EOD