From nobody Wed Jul 13 23:53:38 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 5D8E21D0CA1A for ; Wed, 13 Jul 2022 23:53:41 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ljvb82j2wz3f2s for ; Wed, 13 Jul 2022 23:53:40 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f54.google.com with SMTP id o8so51064wms.2 for ; Wed, 13 Jul 2022 16:53:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1brGjPs3jNqu3a7AzfCzObZ67Qj3y+Soj27hQhNLsKg=; b=aW8pbRNZIjojT0ieo6GjhfADVQNBtEIyY4/YtgQK2dzIUXYcnfRNuagSDTL5L1nVZQ PRi2F3vnFHXxU6nienBwXey/r9GsZ+KljXJvupOD7fDKsLD6iD9P76w9esI/Jh6l9FjT g+/Roidntc9BpKPcZH8edkZTtwUXbdCx9q9XI6FzxDVDhyYMiClmuY3eZHjynKAKo+vB Ix/qu6wlaDKqkapfhhVsqTwfgfopZaHRDCZ89KvQX6ygHNEwiXLu2eCzytgePTaz7R6f PYdg381VXBsOMmz5T9XMfqWY5AIRfU/WApK5OLoUekzSvycKQJcHVgwQOoWx8KyoZ5i9 eYng== X-Gm-Message-State: AJIora9QZMQ0KbnNnh5ML559gChPwlRWhBdC8dgu59RZsxA/9qFp6YC+ ZBK8GumAAee8H7DtdsKxybrx8bspCr61MA== X-Google-Smtp-Source: AGRyM1tBpH7LNuLdo9CV7CIVi04A6F+dIgJAN+ucjczEdth5hRG6JrrZTk015A2zXLCX49NiEmuagg== X-Received: by 2002:a05:600c:3545:b0:3a2:f3e3:c382 with SMTP id i5-20020a05600c354500b003a2f3e3c382mr6594048wmq.142.1657756419138; Wed, 13 Jul 2022 16:53:39 -0700 (PDT) Received: from smtpclient.apple (global-5-142.n-2.net.cam.ac.uk. [131.111.5.142]) by smtp.gmail.com with ESMTPSA id j23-20020a05600c1c1700b0039c747a1e8fsm3627511wms.7.2022.07.13.16.53.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jul 2022 16:53:38 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: git: 6833ac673d98 - main - bsdinstall netconfig: Replace dialog(1) with bsddialog(1) From: Jessica Clarke In-Reply-To: <202204022134.232LY93T053253@gitrepo.freebsd.org> Date: Thu, 14 Jul 2022 00:53:38 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202204022134.232LY93T053253@gitrepo.freebsd.org> To: "Alfonso S. Siciliano" X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Rspamd-Queue-Id: 4Ljvb82j2wz3f2s X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.54:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.54:from] X-ThisMailContainsUnwantedMimeParts: N On 2 Apr 2022, at 22:34, Alfonso S. Siciliano = wrote: >=20 > The branch main has been updated by asiciliano: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6833ac673d98275ef72a887337271401= 1c73eb15 >=20 > commit 6833ac673d98275ef72a8873372714011c73eb15 > Author: Alfonso S. Siciliano > AuthorDate: 2022-04-02 19:29:37 +0000 > Commit: Alfonso S. Siciliano > CommitDate: 2022-04-02 19:33:40 +0000 >=20 > bsdinstall netconfig: Replace dialog(1) with bsddialog(1) >=20 > Replace (LGPL) dialog(1) with (BSD-2-Clause) bsddialog(1). >=20 > Approved by: bapt (mentor) > Differential Revision: https://reviews.freebsd.org/D34682 > --- > usr.sbin/bsdinstall/scripts/netconfig | 62 = +++++++++++++++++------------------ > 1 file changed, 31 insertions(+), 31 deletions(-) >=20 > diff --git a/usr.sbin/bsdinstall/scripts/netconfig = b/usr.sbin/bsdinstall/scripts/netconfig > index f9913c324228..11ee646c403d 100755 > --- a/usr.sbin/bsdinstall/scripts/netconfig > +++ b/usr.sbin/bsdinstall/scripts/netconfig > @@ -32,14 +32,14 @@ > # $FreeBSD$ >=20 > INTERFACES=3D"" > -DIALOG_TAGS=3D"" > +BSDDIALOG_ITEMS=3D"" >=20 > -: ${DIALOG_OK=3D0} > -: ${DIALOG_CANCEL=3D1} > -: ${DIALOG_HELP=3D2} > -: ${DIALOG_EXTRA=3D3} > -: ${DIALOG_ITEM_HELP=3D4} > -: ${DIALOG_ESC=3D255} > +: ${BSDDIALOG_OK=3D0} > +: ${BSDDIALOG_CANCEL=3D1} > +: ${BSDDIALOG_HELP=3D2} > +: ${BSDDIALOG_EXTRA=3D3} > +: ${BSDDIALOG_ESC=3D5} > +: ${BSDDIALOG_ERROR=3D255} >=20 > for IF in `ifconfig -l`; do > test "$IF" =3D "lo0" && continue > @@ -59,19 +59,19 @@ is_wireless_if() { >=20 > for IF in $INTERFACES; do > DESC=3D`sysctl -n dev.$(echo $IF | sed -E = 's/([[:alpha:]]*)([[:digit:]]*)/\1.\2/g').%desc` > - DIALOG_TAGS=3D"$DIALOG_TAGS $IF \"$DESC\"" > + BSDDIALOG_ITEMS=3D"$BSDDIALOG_ITEMS $IF \"$DESC\"" > done >=20 > if [ -z "$INTERFACES" ]; then > - dialog --backtitle 'FreeBSD Installer' \ > + bsddialog --backtitle 'FreeBSD Installer' \ > --title 'Network Configuration Error' \ > --msgbox 'No network interfaces present to configure.' 0 0 > exit 1 > fi >=20 > exec 3>&1 > -INTERFACE=3D`echo $DIALOG_TAGS | xargs dialog --backtitle 'FreeBSD = Installer' --title 'Network Configuration' --menu 'Please select a = network interface to configure:' 0 0 0 2>&1 1>&3` > -if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi > +INTERFACE=3D`echo $BSDDIALOG_ITEMS | xargs -o bsddialog --backtitle = 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please = select a network interface to configure:' 0 0 0 2>&1 1>&3` > +if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi > exec 3>&- >=20 > : > $BSDINSTALL_TMPETC/._rc.conf.net > @@ -101,9 +101,9 @@ case $? in > esac >=20 > if [ ${IPV4_AVAIL} -eq 1 ]; then > - dialog --backtitle 'FreeBSD Installer' --title 'Network = Configuration' \ > + bsddialog --backtitle 'FreeBSD Installer' --title 'Network = Configuration' \ > --yesno 'Would you like to configure IPv4 for this = interface?' 0 0 > - if [ $? -eq $DIALOG_OK ]; then > + if [ $? -eq $BSDDIALOG_OK ]; then > bsdinstall netconfig_ipv4 ${INTERFACE} = "${IFCONFIG_PREFIX}" || \ > exec $0 > else > @@ -116,9 +116,9 @@ if [ ${IPV4_AVAIL} -eq 0 -a -n ${IFCONFIG_PREFIX} = ]; then > echo ifconfig_${INTERFACE}=3D\"${IFCONFIG_PREFIX}\" >> = $BSDINSTALL_TMPETC/._rc.conf.net > fi > if [ ${IPV6_AVAIL} -eq 1 ]; then > - dialog --backtitle 'FreeBSD Installer' --title 'Network = Configuration' \ > + bsddialog --backtitle 'FreeBSD Installer' --title 'Network = Configuration' \ > --yesno 'Would you like to configure IPv6 for this = interface?' 0 0 > - if [ $? -eq $DIALOG_OK ]; then > + if [ $? -eq $BSDDIALOG_OK ]; then > bsdinstall netconfig_ipv6 ${INTERFACE} || exec $0 > else > IPV6_AVAIL=3D0 > @@ -158,34 +158,34 @@ done < ${BSDINSTALL_TMPETC}/resolv.conf > RESOLV=3D"" > if [ ${IPV6_AVAIL} -eq 1 -a ${IPV4_AVAIL} -eq 1 ]; then > RESOLV=3D" > - 'Search' 1 0 \"${SEARCH}\" 1 16 50 0 0 > - 'Nameserver' 2 0 \"Nameserver\" 2 16 50 0 2 > - 'IPv6 DNS #1' 2 0 \"${IP6_1}\" 2 16 50 0 0 > - 'IPv6 DNS #2' 3 0 \"${IP6_2}\" 3 16 50 0 0 > - 'IPv4 DNS #1' 4 0 \"${IP4_1}\" 4 16 16 0 0 > - 'IPv4 DNS #2' 5 0 \"${IP4_2}\" 5 16 16 0 0" > + 'Search' 1 1 \"${SEARCH}\" 1 16 50 50 0 > + 'Nameserver' 2 1 \"Nameserver\" 2 1 11 11 2 > + 'IPv6 DNS #1' 2 1 \"${IP6_1}\" 2 16 50 50 0 > + 'IPv6 DNS #2' 3 1 \"${IP6_2}\" 3 16 50 50 0 > + 'IPv4 DNS #1' 4 1 \"${IP4_1}\" 4 16 16 16 0 > + 'IPv4 DNS #2' 5 1 \"${IP4_2}\" 5 16 16 16 0" > elif [ ${IPV6_AVAIL} -eq 1 ]; then > RESOLV=3D" > - 'Search' 1 0 \"${SEARCH}\" 1 16 50 0 0 > - 'Nameserver' 2 0 \"Nameserver\" 2 16 50 0 2 > - 'IPv6 DNS #1' 2 0 \"${IP6_1}\" 2 16 50 0 0 > - 'IPv6 DNS #2' 3 0 \"${IP6_2}\" 3 16 50 0 0" > + 'Search' 1 1 \"${SEARCH}\" 1 16 50 50 0 > + 'Nameserver' 2 1 \"Nameserver\" 2 1 11 11 2 > + 'IPv6 DNS #1' 2 1 \"${IP6_1}\" 2 16 50 50 0 > + 'IPv6 DNS #2' 3 1 \"${IP6_2}\" 3 16 50 50 0" > elif [ ${IPV4_AVAIL} -eq 1 ]; then > RESOLV=3D" > - 'Search' 1 0 \"${SEARCH}\" 1 16 50 0 0 > - 'Nameserver' 2 0 \"Nameserver\" 2 16 50 0 2 > - 'IPv4 DNS #1' 2 0 \"${IP4_1}\" 2 16 16 0 0 > - 'IPv4 DNS #2' 3 0 \"${IP4_2}\" 3 16 16 0 0" > + 'Search' 1 1 \"${SEARCH}\" 1 16 50 50 0 > + 'Nameserver' 2 1 \"Nameserver\" 2 1 11 11 2 > + 'IPv4 DNS #1' 2 1 \"${IP4_1}\" 2 16 16 16 0 > + 'IPv4 DNS #2' 3 1 \"${IP4_2}\" 3 16 16 16 0" > else > exit 0 > fi >=20 > exec 3>&1 > -RESOLV=3D$(echo "${RESOLV}" | xargs dialog --backtitle 'FreeBSD = Installer' \ > +RESOLV=3D$(echo "${RESOLV}" | xargs -o bsddialog --backtitle 'FreeBSD = Installer' \ > --title 'Network Configuration' \ > --mixedform 'Resolver Configuration' 0 0 0 \ Not having the --hline "Use TAB and Enter to select OK" for this like hostname makes it rather confusing as to why pressing Enter on this screen no longer works. Jess > 2>&1 1>&3) > -if [ $? -eq $DIALOG_CANCEL ]; then exec $0; fi > +if [ $? -eq $BSDDIALOG_CANCEL ]; then exec $0; fi > exec 3>&- >=20 > echo ${RESOLV} | tr ' ' '\n' | \