From nobody Sat Sep 17 00:08:21 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MTrr62bLjz4cZpq; Sat, 17 Sep 2022 00:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MTrr60qyNz3sy5; Sat, 17 Sep 2022 00:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663373302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vlde92COHQneLAhUPlQXbqM8aBqitc3MzxSgBFTmGso=; b=JDd3M1nzC3HvQMW+uU/uwBOCzTbzr0qgAjWhN4VMet55Dnhg2m9v3n4IkmO3O9mIYt/IzX zIVa8AaQfUoQdXe4GR5EU/dyAlXR8RUFcTsttqueSvM32BsDQbRJw38FpA7H3Az5ZP8wyx E4e3r694xRQ8+B0W95/BDhu/831M4o8owl7LCqm19UYfLw5dIap7VauIO1M4tVfQLl5iqm 1FG9KK2v51XGx/JSHn20iXNKqoQ1Z2NWuHhDaeMn0WePBAczIfr/lznV1CH0GtpLRHPf8N N9VIXjobY8UkrnF+eXDw9m5Q5epCX8RoqGMvvcXqMfmHS8VopU1Erwpb6pDhfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MTrr56vj0zXCt; Sat, 17 Sep 2022 00:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28H08Lq5000556; Sat, 17 Sep 2022 00:08:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28H08LRA000555; Sat, 17 Sep 2022 00:08:21 GMT (envelope-from git) Date: Sat, 17 Sep 2022 00:08:21 GMT Message-Id: <202209170008.28H08LRA000555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ben Woods Subject: git: e4505364c087 - main - release/rc.local: Provide option to shutdown after installation complete List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: woodsb02 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4505364c08764e7d7d70b1a0ce7de7fb041de62 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663373302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vlde92COHQneLAhUPlQXbqM8aBqitc3MzxSgBFTmGso=; b=OfRorRYWYWqcrO0W1vUzetdXdL21dZ5NEfEc3zkj20zH6BLmEPfD9CB7fpJz3BqwcLmXFU /wTQXzEmpWQUEPUDGSEstydVf/UmCmPaAO6dsktEQBx/o75HPMBA5/5wjqzgl5sae+RBWT IGqNTtlW+erj/cBFpu1W2JLC7fOO+tPD8qzzpIQi+3yw+q/ltTVx7PK+AC+Eu+CCHzJX/6 O1/5hn/D4IVfjy7Eftho9E7n30Diz7ciDK4JxXX0KMqKOUOlM19kz+RY+Q76T6r1U7na2L X//t0zxaC3qav/yMjjNmGj9ITdVBquBY6uldtVQgNDUtID7z5MLP+Kgep3cgoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663373302; a=rsa-sha256; cv=none; b=YOympHzU+W8D1zjqnelFIr3ukZfjJ9dbkVmv810/2dBPH0teuAicvOoiWy2k9yt+I8aNDp 2xlMruOJSybKhlsXQkDgMcaPMXntjL4GF7Dgq1MaZLjayUNt3l+nOLB9zGOMS83h2LRAw1 PnyIqoO/aQ1Wm2Wkjy8f+D2DMdIBfwaTPlKOdSu51b/C9o2R6m1vLdhwZh18fO7nhuBoKa opPuwHl3O2/DBQycLhTuO2SDNU03NTzzr+g2Ey7R0D3Q9hM3rYDgslCcwcul0Qvs7A7fO6 tTWJBRWcN8PoWsHSJ5tBBFwNwrYbOtufuhhVDb9api2W4/SsrfeLdYiqvRc6rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by woodsb02 (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e4505364c08764e7d7d70b1a0ce7de7fb041de62 commit e4505364c08764e7d7d70b1a0ce7de7fb041de62 Author: Ben Woods AuthorDate: 2022-09-14 13:03:22 +0000 Commit: Ben Woods CommitDate: 2022-09-17 00:07:25 +0000 release/rc.local: Provide option to shutdown after installation complete This can be useful instead of reboot if installing in a virtual machine, and the user wants to modify the VM hardware or virtual media mounts prior to booting into the newly installed system. Reported by: Juan Manuel Palacios (@jmp_imaginarium on Twitter) Approved by: philip Differential Revision: https://reviews.freebsd.org/D36560 --- release/rc.local | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/release/rc.local b/release/rc.local index 0b8df48b2085..94f8927989f5 100755 --- a/release/rc.local +++ b/release/rc.local @@ -74,7 +74,19 @@ $BSDDIALOG_OK) # Install trap true SIGINT # Ignore cntrl-C here bsdinstall if [ $? -eq 0 ]; then - bsddialog --backtitle "FreeBSD Installer" --title "Complete" --yes-label "Reboot" --no-label "Live CD" --yesno "Installation of FreeBSD complete! Would you like to reboot into the installed system now?" 0 0 && reboot + bsddialog --backtitle "FreeBSD Installer" --title "Complete" --ok-label "Reboot" --extra-button --extra-label "Shutdown" --cancel-label "Live CD" --yesno "Installation of FreeBSD complete! Would you like to reboot into the installed system now?" 0 0 + + case $? in + $BSDDIALOG_OK) # Reboot + reboot + ;; + $BSDDIALOG_EXTRA) # Shutdown + shutdown -p now + ;; + $BSDDIALOG_CANCEL) # Live CD + exit 0 + ;; + esac else . /etc/rc.local fi