Author: gjb
Date: Thu Aug 10 13:32:04 2017
New Revision: 322358
URL: https://svnweb.freebsd.org/changeset/base/322358

Log:
  Further revise r322327 and r322352 in release/packages/kernel.ucl.
  
  Use PPID and PID to kill off the pre-install and parent pkg(8)
  processes unless 'Y' or 'y' are entered at the prompt if the user
  wants to proceed with upgrading the kernel and userland at the same
  time.
  
  This restores some of the logic and intent of r322327, with the
  caveat of printing "child process terminated unexpectedly."
  
  MFC after:    5 days
  MFC with:     r322327, r322352
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/packages/kernel.ucl

Modified: head/release/packages/kernel.ucl
==============================================================================
--- head/release/packages/kernel.ucl    Thu Aug 10 13:05:40 2017        
(r322357)
+++ head/release/packages/kernel.ucl    Thu Aug 10 13:32:04 2017        
(r322358)
@@ -40,7 +40,17 @@ scripts: {
        echo "  pkg upgrade"
        echo
        echo "****************************************************************"
-       sleep 5
+       echo
+       echo "Do you want to continue anyway? (N/y)"
+       read ANSWER
+       case ${ANSWER} in
+               [Yy])
+                       exit 0
+                       ;;
+               *)
+                       kill ${PPID} ${PID}
+                       ;;
+       esac
 EOD
 
        post-install = <<EOD
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to