From nobody Tue May 24 12:20:54 2022 X-Original-To: dev-commits-src-all@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 CFC221B4B586; Tue, 24 May 2022 12:20:54 +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 4L6tZt5YH9z3qN2; Tue, 24 May 2022 12:20:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653394854; 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=+qw6JyLRzDpbBFx2Ey41OHqsWX3rGEUpj2eHeLN1lhY=; b=vErwPtVOs3SnZI9qkE2tLvpdr97mv1lXjnPr4vh8IXv2KBVKsQew5skxicDNZeADejCBIa qTT3czxRmNPkDVKvnZ/ari2k+wls1ikPZtvFSBaectfq2OivNZvN66H7XBSpeOge6ydOWF 3HBZmow8Oi/OXNfTvE3739ERrWodOu3dlwLtbdji4Pxwz0ErJQFd++Om2b82/7z+cx5muJ h3Kve1Qx8xm8o2lXVC/rarhopunO7qdecSL8bFREB0ndTdHEKlGdg/Ik7DooMwK6gUpw28 Yra+p+XyH+cOr0CcACLSypIf8Mz3LDaVMDfh21wo6d8PHNAeJxMvIrkKR5QgeA== 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 9AC4E24436; Tue, 24 May 2022 12:20:54 +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 24OCKsHU040105; Tue, 24 May 2022 12:20:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24OCKshJ040104; Tue, 24 May 2022 12:20:54 GMT (envelope-from git) Date: Tue, 24 May 2022 12:20:54 GMT Message-Id: <202205241220.24OCKshJ040104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfonso S. Siciliano" Subject: git: 6368dcb29228 - main - bsdinstall hostname: Replace dialog with bsddialog List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asiciliano X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6368dcb29228dd8e18d50c54c3ca1596262d4676 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653394854; 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=+qw6JyLRzDpbBFx2Ey41OHqsWX3rGEUpj2eHeLN1lhY=; b=sxy+cSfVqtiuO2qYvLh+KIEGqiyEyHvgIdkjaaSTkk2EhtIi94/u7b/uxlT8HNCd85BNZq VFkLBzJQwHLuzDYkjAWQVDqLruY+dK7wD9N0GYv6aQVHKxWxcj3Yw1AGEcLQ9dVC/GPMFI csiECXrw97gseG+HZVVS9c+RUkU5SxxH0Lqt3qrQ1B75UySen4ouyteyFuqyCyfMiWQeIU xWtmqq+DY6Rrtfb6tk9sgrXvrPbpHg2hrZLJEPQEhDyUrkNPf7nlNk7U5+ISF3jJl+t1+z TaGcMhUDuuW4MOqQAMjM48+Q8vTHGr6VSvjl1wV7/Q6mX/DXZ60koUDPumUWCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653394854; a=rsa-sha256; cv=none; b=RNXgxFxnKN+TROxu3LWtmjjxhBZAKIxdHCOiWhc1W//9OLSqTHc146rcoZNozP6ipb7BiN FI3HnynHUzoSx31azosbtWbmE32MRGuXJ6cchXUmY57OC7Hj+1cjXUS3BNthO/HRxUTY6W YPuHpaElJSsl5DQtiqczvWMV4+Xsszn+epGiJuBepXcHn7zhcTo/bs+9fatZzM/rCbCn1Y 8T5MmHl21pUjAHxyKak6xOIrzq/gFNnDfRnd/+hr8fvyh3vmsl7tfLj/Kb8KQyPTPXHtew fpe+NJg3nt6+vnzfO4wJsAB/cT+wYMX/hKAyeG6oBLRh+MW68nu52bAVFv5nVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=6368dcb29228dd8e18d50c54c3ca1596262d4676 commit 6368dcb29228dd8e18d50c54c3ca1596262d4676 Author: Alfonso S. Siciliano AuthorDate: 2022-05-24 12:04:24 +0000 Commit: Alfonso S. Siciliano CommitDate: 2022-05-24 12:20:22 +0000 bsdinstall hostname: Replace dialog with bsddialog Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility. Add --hline info because bsddialog requires TAB to switch the focus on buttons for an inputbox, dialog differs. Delete f_dialog_inputbox_size() using libbsddialog autosizing. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D35285 --- usr.sbin/bsdinstall/scripts/hostname | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/hostname b/usr.sbin/bsdinstall/scripts/hostname index b151ef15c690..23adbe68ead0 100755 --- a/usr.sbin/bsdinstall/scripts/hostname +++ b/usr.sbin/bsdinstall/scripts/hostname @@ -48,6 +48,8 @@ f_include $BSDCFG_SHARE/dialog.subr ############################################################ GLOBALS +: ${BSDDIALOG_CANCEL=1} + # # Strings that should be moved to an i18n file and loaded with f_include_lang() # @@ -71,21 +73,17 @@ SET_HOSTNAME='hostname -s "%s"' dialog_hostname() { local prompt="$msg_please_choose_a_hostname" - local hline= + local hline="Use TAB and Enter to select $msg_ok" local value="$*" - local height width - f_dialog_inputbox_size height width \ - "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$prompt" "$value" "$hline" - - $DIALOG \ + bsddialog \ --title "$DIALOG_TITLE" \ --backtitle "$DIALOG_BACKTITLE" \ --hline "$hline" \ --ok-label "$msg_ok" \ --no-cancel \ --inputbox "$prompt" \ - $height $width "$value" \ + 0 56 "$value" \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD } @@ -101,7 +99,7 @@ f_dialog_backtitle "$msg_freebsd_installer" # Get user input # HOSTNAME=$( dialog_hostname "$HOSTNAME" ) -[ $? -eq $DIALOG_CANCEL ] && exit 1 +[ $? -eq $BSDDIALOG_CANCEL ] && exit 1 # # Store the user's choice