From nobody Sat May 21 16:05:07 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 72B511B3B345; Sat, 21 May 2022 16:05:07 +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 4L57hz2m4vz4cp9; Sat, 21 May 2022 16:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653149107; 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=uwxJ12NarWDobzNMmkV+LcK9rDVa1deEe+LWsoEyP0I=; b=BMv09umBFzVwqdH/OJj5XoHwHnT2e3GGJZTUZe6+jARQdfJupdf0UQqx1+Rtomlqr7rc0+ 1IeSsLhCfQrzWiiwk2+5WSDvvP6s6WF3f6FroCnOYjUxefXZfCwUjNEcPbkByIDe7CVYZG hV7RqBQl5FeLwLvEf0OjmdiftPpmfbi0gAtfnctAn8OPXbSsZB6YEKtLSrQ1WsBg4Xjinu LK5O/ZSbwMk487kvT3zRNN06cvQUksc9NjQU7/lO4fT6IBB9R9JjSwIkr/cTiZ6W/aHY8m FCMD/wPrGQrRdtW2YSBxFbgTxusj8+RcB6p0ZulYpBDmAMiMJtotd0IbWjj9Xg== 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 3BAC71B31; Sat, 21 May 2022 16:05:07 +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 24LG57Ka094474; Sat, 21 May 2022 16:05:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24LG57f0094473; Sat, 21 May 2022 16:05:07 GMT (envelope-from git) Date: Sat, 21 May 2022 16:05:07 GMT Message-Id: <202205211605.24LG57f0094473@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: 58c63d5e37cb - main - bsdinstall netconfig_ipv6: 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: 58c63d5e37cb3a04355b63e853dfdc145e77cb09 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653149107; 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=uwxJ12NarWDobzNMmkV+LcK9rDVa1deEe+LWsoEyP0I=; b=dxULwqqkloxY2QJQcHI9XV9E2UrvRIYDoEgbgI1yS0rgMrJureOGDGvBZa74JStBNpIXxY NLWc/2pixBWt2T99ybugp6R8w6lD3vTuPlG7vmPDyAxi3gFo7zg7KnyNzK933U0TaEFQZD qFpr5Apx/R0VVjRLZOSY7BCCU+iJ2z2AzBDG7SQ/m8ieUZ46fhPdYOLOt8RbyuR4/LgvT6 bwa2aPmDiNP3Q5yT9UYHqyaoZgVeUqg1WFLeII5dX0OtpZwRGiXlcXbERLPGiCfapECtKp VEwwqRAQQbUM8UYJBbZWD4YiPP9XyLPT/AnkkWpDCmoFrCuychPTTkQl11FIQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653149107; a=rsa-sha256; cv=none; b=fnubmHtvUKv27zv9u93DCBmCMII5SQkAJhi1pR9gTouau+u9NB17MAPNx4Q8WHXrl7TXoz 70v/9G5jiCBPXwEs83ZWHR751eHrdfCNqo8iVOWCd+na6G3wdfd1LNSiJKnNQDpqKqwoy+ f8PFCZLbowJCo9hrs99wE6XsskK80j3atFFNYsdXShBSv9TyZu3halwDtO2qTqIlnSTb2S aUvlifVQaDlSPh9vZodQLQGsc/a7+xBtMZP9wV9nu8IxBMpEAqobUBk4ZC/J7M7mCwTrXN lsg3meEaf0dbd9PJa+jU+c9F0GHbYbokagJK8x2Js+QBQlxNwZV5y9BCpea0ng== 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=58c63d5e37cb3a04355b63e853dfdc145e77cb09 commit 58c63d5e37cb3a04355b63e853dfdc145e77cb09 Author: Alfonso S. Siciliano AuthorDate: 2022-05-21 16:02:20 +0000 Commit: Alfonso S. Siciliano CommitDate: 2022-05-21 16:04:28 +0000 bsdinstall netconfig_ipv6: Replace dialog with bsddialog Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D35270 --- usr.sbin/bsdinstall/scripts/netconfig_ipv6 | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 index abc53906f4ad..d915727a8610 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 @@ -40,6 +40,9 @@ f_include $BSDCFG_SHARE/dialog.subr ############################################################ MAIN +: ${BSDDIALOG_OK=0} +: ${BSDDIALOG_CANCEL=1} + # # TODO: # - Add DHCPv6 support once FreeBSD ships with it. @@ -47,7 +50,7 @@ f_include $BSDCFG_SHARE/dialog.subr INTERFACE=$1 case "${INTERFACE}" in -"") dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ +"") bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ --msgbox 'No interface specified for IPv6 configuration.' 0 0 exit 1 ;; @@ -56,17 +59,17 @@ esac AGAIN="" while : ; do MSG="Would you like to try stateless address autoconfiguration (SLAAC)${AGAIN}?" - dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ + bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ --yesno "${MSG}" 0 0 - if [ $? -eq $DIALOG_OK ]; then + if [ $? -eq $BSDDIALOG_OK ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then - dialog --backtitle 'FreeBSD Installer' \ + bsddialog --backtitle 'FreeBSD Installer' \ --infobox "Sending Router Solicitation ..." 0 0 ifconfig ${INTERFACE} inet6 -ifdisabled accept_rtadv up err=$( rtsol -F $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then f_dprintf "%s" "$err" - dialog --backtitle 'FreeBSD Installer' --msgbox "SLAAC failed." 0 0 + bsddialog --backtitle 'FreeBSD Installer' --msgbox "SLAAC failed." 0 0 AGAIN=" again" continue fi @@ -90,27 +93,27 @@ BEGIN { # For the moment ignore all but the first address; it might confuse the user. if (n > 0) { next; }; n++; - printf "\"IPv6 Address\" %d 0 \"%s/%s\" %d 16 50 0 0 ", n, $2, $4, n; + printf "\"IPv6 Address\" %d 1 \"%s/%s\" %d 16 50 50 0 ", n, $2, $4, n; } } END { if (n == 0) { n++; - printf "\"IPv6 Address\" %d 0 \"\" %d 16 50 0 0 ", n, n; + printf "\"IPv6 Address\" %d 1 \"\" %d 16 50 50 0 ", n, n; } n++; # Nasty trick adding a (hidden, same y) read-only field as a marker # to separate interface address(es) from the default router. - printf "\"Default Router\" %d 0 \"%s\" %d 16 50 0 2 ", n, "DefaultRouter", n; - printf "\"Default Router\" %d 0 \"%s\" %d 16 50 0 0 ", n, dfr, n; + printf "\"Default Router\" %d 1 \"%s\" %d 1 14 14 2 ", n, "DefaultRouter", n; + printf "\"Default Router\" %d 1 \"%s\" %d 16 50 50 0 ", n, dfr, n; }'` exec 3>&1 -IF_CONFIG=$(echo ${ADDRS} | xargs dialog --backtitle 'FreeBSD Installer' \ +IF_CONFIG=$(echo ${ADDRS} | xargs -o bsddialog --backtitle 'FreeBSD Installer' \ --title 'Network Configuration' \ --mixedform 'Static IPv6 Network Interface Configuration' 0 0 0 \ 2>&1 1>&3) -if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi +if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi exec 3>&- echo ${IF_CONFIG} | tr ' ' '\n' | \