From nobody Thu Oct 19 11:00:19 2023 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 4SB4W73XVzz4xHs6; Thu, 19 Oct 2023 11:00:19 +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 4SB4W731Spz3dK1; Thu, 19 Oct 2023 11:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697713219; 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=7L151Cej8FIrzCCwm+I8WLzTkWUIubJ8+WfpwH8NUTM=; b=iWV8j419t+N4gDuv/Hi2hKVWAILgKj2BbQsaUecSayY6sLxpXlH0EAdYQ63ZRrbzGV8iIg KD0hoiwrkA/ZTFZkkM1V6cEIieDd3Rd9MmeePta3H0wdPvpdqr3xny+0Ruuj2o79Oprr43 +khny2e9vtqHWHf1/BipMs82jYuu9L5FHx+MsWY1JRnym00y/qaqwt/XqchFO1lRBX0HRR lZ8XAs1r93V7XrZOdpPhVlkEAAhrjfUtGAeQiOpXJ+325a0eeYT3/UoDsOrH80+tS4OZi8 BQEcs5NHecZLO9+BpQM69+HUFAfllcJioxoCyCRnXMSHcK1TYsn0KdVJurz3OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697713219; a=rsa-sha256; cv=none; b=cUk4H/evRWeDQVE2RcuezCktQ05CRc6806pQeiuPSPIgxmf5221qFN0Q3zh77UFVnvG41H 9uV8TuSDtzM1tjG5rrLXcY8cxtJZTLt6DtnZlOdnvUnqS4GNkPPYO04iQElR6PyR0sHmDY 74DTPdz8t3L+gfKvE6bJXYPPB+toXN3YSwdR6E7zl6NaoKpTGkzfPjvDT03g5HAEBllkZ0 hax6ZfN+S5A6YY27DqGctiUpEsXqrjMbbOL6+Vb8FyKDoboym1vU34uYUOE1s30wJDlVDY 4rTBwNIHXTAHod0OWUMXehTeggflM0gnPkRKUAPP9LFWf5gjER63Ib0C6y7McQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697713219; 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=7L151Cej8FIrzCCwm+I8WLzTkWUIubJ8+WfpwH8NUTM=; b=R0KmERIT0sKSRAeBhUP82BuQwXU/VLQJXGNHDKfCUsw8bJPHA3kQ752DHuse0ByQ7KeiSq cyKStdccpRNhgt5kGGxDFhvdqLqU/yhR2w6foZXwviXoxfgTtUk7fqD7cz1Dc2vwPRYNca CGuzvpG44tHrg5shk4aX2+GtYdneNzvXmJb8AllzC5W/9DzMZXQruI3IJEtfFaer/RD6/P +K/tLNhM2Jem5Wt+/XwB8MKS93n+vGmbM/5w1TLNgNC+Nb92BiRhAS2d2mDCkTprLdDtcE BukYAnzfa1U92p9U/XxSddILCMeetPRcaCWMCZ/DdN3S0geC5n/VMaQi3aMHNQ== 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 4SB4W724Sxzm2k; Thu, 19 Oct 2023 11:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39JB0Jce039293; Thu, 19 Oct 2023 11:00:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JB0JJN039291; Thu, 19 Oct 2023 11:00:19 GMT (envelope-from git) Date: Thu, 19 Oct 2023 11:00:19 GMT Message-Id: <202310191100.39JB0JJN039291@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: e44751530e04 - main - bsdinstall hostname: Restore bsdconfig API 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: asiciliano X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e44751530e04ef8326ff22c0d3f7d880c82d3395 Auto-Submitted: auto-generated The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=e44751530e04ef8326ff22c0d3f7d880c82d3395 commit e44751530e04ef8326ff22c0d3f7d880c82d3395 Author: Alfonso S. Siciliano AuthorDate: 2023-10-19 10:54:24 +0000 Commit: Alfonso S. Siciliano CommitDate: 2023-10-19 10:59:49 +0000 bsdinstall hostname: Restore bsdconfig API Restore bsdconfig API to handle hostname dialog because bsddialog 1.0 matches all features required by bsdconfig(1). Implicitly this commit restores also Xdialog(1) for this script. This commit reverts: - "bsdinstall hostname: Replace dialog with bsddialog" 6368dcb29228dd8e18d50c54c3ca1596262d4676 - "bsdinstall(8) hostname: Update for bsddialog 0.3" 5f3ec44e7e9c11f90ad1128db1116925b493fad0. The script continues to use bsddialog(1) by default via $DIALOG in bsdconfig(1). --- usr.sbin/bsdinstall/scripts/hostname | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/hostname b/usr.sbin/bsdinstall/scripts/hostname index 7aa97ef095f7..19df8885893b 100755 --- a/usr.sbin/bsdinstall/scripts/hostname +++ b/usr.sbin/bsdinstall/scripts/hostname @@ -47,8 +47,6 @@ 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() # @@ -75,14 +73,18 @@ dialog_hostname() local hline= local value="$*" - bsddialog \ + local height width + f_dialog_inputbox_size height width \ + "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$prompt" "$value" "$hline" + + $DIALOG \ --title "$DIALOG_TITLE" \ --backtitle "$DIALOG_BACKTITLE" \ --hline "$hline" \ --ok-label "$msg_ok" \ --no-cancel \ --inputbox "$prompt" \ - 0 0 "$value" \ + $height $width "$value" \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD } @@ -98,7 +100,7 @@ f_dialog_backtitle "$msg_freebsd_installer" # Get user input # HOSTNAME=$( dialog_hostname "$HOSTNAME" ) -[ $? -eq $BSDDIALOG_CANCEL ] && exit 1 +[ $? -eq $DIALOG_CANCEL ] && exit 1 # # Store the user's choice