From nobody Sat May 21 15:41:31 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 D3FB51B34DB5; Sat, 21 May 2022 15:41:32 +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 4L579m1ym2z4YYm; Sat, 21 May 2022 15:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653147692; 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=zPQFXabuKNUZIXeiEYh/972/WOBTErsTL/AcSNXQ4rE=; b=jwr+3OCdpqcH8d148l5AnEUw/vBiKbmSKapvA4rljgwV+U8jyW0Jzfp+J3aT+8tR9RKk0B AJ9YEoqgrUvwvQT+T6c4xGd1whUvTYc6YnmYeGNUx9RxTLiwYM9unYm+bllVhOxxaF47FM iK8tGN+ZLwiA6tF/zAwlcpfsHn6wtTotIjxxrXiH4OfbDPXpBRithZjsC5VCAe9wsHThZn nnBI49jOXYycKGy4P+KRvD9e+ii2zvE75YNdiNLPsofcnC0ia8JUY4zrrl2rzRp/rCP3FG FuNnkUxnwEvMdsAgDdEK4xWN5KrDWcfD6z6y4fCAIoqqaALkK6Pe7IdoBOGG1w== 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 B5750181A; Sat, 21 May 2022 15:41:31 +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 24LFfV6j065137; Sat, 21 May 2022 15:41:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24LFfVGq065136; Sat, 21 May 2022 15:41:31 GMT (envelope-from git) Date: Sat, 21 May 2022 15:41:31 GMT Message-Id: <202205211541.24LFfVGq065136@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: 90943fbfeb1a - main - bsdinstall netconfig_ipv4: 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: 90943fbfeb1a3cbe2be99acddb5cae45d48e1e52 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653147692; 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=zPQFXabuKNUZIXeiEYh/972/WOBTErsTL/AcSNXQ4rE=; b=K5ZIQNwzV1+cM8i24ObxpGJWfgogG1mHU+Jfu3izGzidhHlm9yvKl+POVrOyQzh+6l/1f3 sQZATSwFJpPI29V2q8Zaed5/yMxDTs9Q3UQz2ScGfy19ffeeP2NTVlH2oNXxRQzpVRldFR ohR/698IHZMqvtvWWdfqOcoOJNA5Eq4lwVPo+C5EF93pkFQbttsBi2PV8bWqnSTackqw3b 83NfbF3o1T1ioE7zRIvJhvt6LVTh2EuS1IrkE9WwFpnIqmpaB+CbwwzspA+m381rwaOzpT gk1uqQjdbfn0G7q5eyupG8ado3WLCDLGvR1ISlSz09g4EloHDedJhkG5q2Uhhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653147692; a=rsa-sha256; cv=none; b=WP/AOE8cjEolNxuhrl9g+ePpxtgGdwdqAa/VFPPfYku0SGVt4heAdBMwwnCWnf5RJM0hpO IxjJMmSHF4E11Nx+QBKve9Ez4yX1fglBkMd+Qd2nezPxhyC94cgsxzupKJ2wIEfDpwkYR7 ooe9D+KL9gbw9Dgy16haTbB/BwoZ7Az571ffX+YUShvD8z5UPRrHHnoTCicIXiV0b2pVlc Q8K3Q674Sfr+aj08+DlU+yP8ZFC25c7mRJy8/jwGUU34QUzsF/TtLWFAI9/jVFF1JJ5EfA bjGsGvdPOyVGxZsVudOnMZUujOQuBlWYFBtrQtUzGJ17M6g3lg++J+JZwZhl/A== 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=90943fbfeb1a3cbe2be99acddb5cae45d48e1e52 commit 90943fbfeb1a3cbe2be99acddb5cae45d48e1e52 Author: Alfonso S. Siciliano AuthorDate: 2022-05-21 15:37:12 +0000 Commit: Alfonso S. Siciliano CommitDate: 2022-05-21 15:40:34 +0000 bsdinstall netconfig_ipv4: Replace dialog with bsddialog Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D35267 --- usr.sbin/bsdinstall/scripts/netconfig_ipv4 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 index 44dc8cf21f1d..e0e540188aba 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 @@ -36,28 +36,31 @@ f_include $BSDCFG_SHARE/dialog.subr ############################################################ MAIN +: ${BSDDIALOG_OK=0} +: ${BSDDIALOG_CANCEL=1} + INTERFACE=$1 IFCONFIG_PREFIX="$2" test -z "$IFCONFIG_PREFIX" || IFCONFIG_PREFIX="$2 " case "${INTERFACE}" in -"") dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ +"") bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ --msgbox 'No interface specified for IPv4 configuration.' 0 0 exit 1 ;; esac -dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 -if [ $? -eq $DIALOG_OK ]; then +bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 +if [ $? -eq $BSDDIALOG_OK ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then # XXX: get interface down otherwise after installation restart # dhclient does not build a new resolv.conf (see PR262262). ifconfig $INTERFACE down ifconfig $INTERFACE up - dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 + bsddialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 err=$( pkill -F /var/run/dhclient/dhclient.${INTERFACE}.pid; dhclient $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then f_dprintf "%s" "$err" - dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0 + bsddialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0 exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" fi fi @@ -70,12 +73,12 @@ NETMASK=`ifconfig $INTERFACE inet | awk '/inet/ {printf("%s\n", $4); }'` ROUTER=`netstat -rn -f inet | awk '/default/ {printf("%s\n", $2);}'` exec 3>&1 -IF_CONFIG=$(dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --form 'Static Network Interface Configuration' 0 0 0 \ - 'IP Address' 1 0 "$IP_ADDRESS" 1 20 16 0 \ - 'Subnet Mask' 2 0 "$NETMASK" 2 20 16 0 \ - 'Default Router' 3 0 "$ROUTER" 3 20 16 0 \ +IF_CONFIG=$(bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --form 'Static Network Interface Configuration' 0 0 0 \ + 'IP Address' 1 1 "$IP_ADDRESS" 1 20 16 0 \ + 'Subnet Mask' 2 1 "$NETMASK" 2 20 16 0 \ + 'Default Router' 3 1 "$ROUTER" 3 20 16 0 \ 2>&1 1>&3) -if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi +if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi exec 3>&- echo $INTERFACE $IF_CONFIG |