From nobody Sat Apr 2 21:34:09 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 080351A58FD3; Sat, 2 Apr 2022 21:34:10 +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 4KW9KF6mcfz3PKX; Sat, 2 Apr 2022 21:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648935250; 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=5hwpjQ+hKSKqJdwzqmWDORJsn0lfsrTcjRdBXfOD4Ig=; b=RqAPLHJkT/LYf/I/1P+HeT+p/z6vaucGoQ3YERPMPps5QE3bDKGwtLRy7wdeJ47sbUS7Bf 4TGvHYE5aJpTNC0In7bHbW+ZB13xsjhWXfCzYqCSAR5zESr6JIpcI0bFjZ1rfXRVMEZE7Y gfj4Gd1iYsciOScLcp7etKssJ9BGQYfHmgJViAOkCbw3/ecO43hmRXtHAX/Ji9zIiaLJwB ob82CuiYnCRUCDzTeUOGqPUb3BCl9eT0xhPhJOEVeKdVBaHwteUOlcKBL9d24TaayYd4M3 dKRXnfsUU4hWlFNZn6W8wpY2m0CEwv4cZe1tGHXxQbt9p8xL5CV7jndWj+7faw== 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 C86D010DB1; Sat, 2 Apr 2022 21:34:09 +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 232LY97O053254; Sat, 2 Apr 2022 21:34:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 232LY93T053253; Sat, 2 Apr 2022 21:34:09 GMT (envelope-from git) Date: Sat, 2 Apr 2022 21:34:09 GMT Message-Id: <202204022134.232LY93T053253@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: 6833ac673d98 - main - bsdinstall netconfig: Replace dialog(1) with bsddialog(1) 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: 6833ac673d98275ef72a8873372714011c73eb15 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648935250; 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=5hwpjQ+hKSKqJdwzqmWDORJsn0lfsrTcjRdBXfOD4Ig=; b=BaGfVx7UFqdMxWgGAwJbmk5wyswnFALLGyOQQnEWPacV1+YHXmEOCZeBhr2+H4s1LS8sXJ 2GbQ3ma/XY31KeJLMRs4vO9tqONuaM19BCdJkbMUbwSBxzgkrJYSOjlxHx4X+ndazYKQww 8vthVI8wE0tTD0c0NAsKJvFRV3ox1W7Ds0mzxjdrauNl0UGL5TVWel4/GhEhOgAuvFyOjh OAT6nl3rIDdg0jjexrUi3uV1AvGQJErYkE7siFlIbx7lJa/yyJtp4R1PRnIGuTaBWyrvcm OzZQ9oV4OKg84ZoFUM995wcDfRUUNO8I7ae/wRjB8hDZA+F3ixVGM96QATyajQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648935250; a=rsa-sha256; cv=none; b=oDz1h3L74v/S/vLQyTykOGHqGQLr42y9sdhdfTAc8zuMj2Pj4vLYod3FRqJSxisAk58CWL zTs1iQT9MK0EXPmEFHEnjv/zKbEPUsfEcmKr6dcbNy+rB8iaW96+3uPIocOuA6KyddKYvf CSkmlPDCIqvwJkDFQ4AsLYwuJqudu05v+St3zm6UOLjRGVvVqxZTrkpEtLrqpN5OB5GbK9 i3FUDaRfEE95oDfVx0zENT5mDhG1etak7R7HJBqDPQoywXyhNK0Iswiij0gs1zsTiKVNLv iHC1EnMVC599cib09WJRdsS5quuTO8MI2EvuuLxWCXiCyaXsrL9l73oKj07+ZQ== 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=6833ac673d98275ef72a8873372714011c73eb15 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 bsdinstall netconfig: Replace dialog(1) with bsddialog(1) Replace (LGPL) dialog(1) with (BSD-2-Clause) bsddialog(1). Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D34682 --- usr.sbin/bsdinstall/scripts/netconfig | 62 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) 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$ INTERFACES="" -DIALOG_TAGS="" +BSDDIALOG_ITEMS="" -: ${DIALOG_OK=0} -: ${DIALOG_CANCEL=1} -: ${DIALOG_HELP=2} -: ${DIALOG_EXTRA=3} -: ${DIALOG_ITEM_HELP=4} -: ${DIALOG_ESC=255} +: ${BSDDIALOG_OK=0} +: ${BSDDIALOG_CANCEL=1} +: ${BSDDIALOG_HELP=2} +: ${BSDDIALOG_EXTRA=3} +: ${BSDDIALOG_ESC=5} +: ${BSDDIALOG_ERROR=255} for IF in `ifconfig -l`; do test "$IF" = "lo0" && continue @@ -59,19 +59,19 @@ is_wireless_if() { for IF in $INTERFACES; do DESC=`sysctl -n dev.$(echo $IF | sed -E 's/([[:alpha:]]*)([[:digit:]]*)/\1.\2/g').%desc` - DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\"" + BSDDIALOG_ITEMS="$BSDDIALOG_ITEMS $IF \"$DESC\"" done 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 exec 3>&1 -INTERFACE=`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=`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>&- : > $BSDINSTALL_TMPETC/._rc.conf.net @@ -101,9 +101,9 @@ case $? in esac 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}=\"${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=0 @@ -158,34 +158,34 @@ done < ${BSDINSTALL_TMPETC}/resolv.conf RESOLV="" if [ ${IPV6_AVAIL} -eq 1 -a ${IPV4_AVAIL} -eq 1 ]; then RESOLV=" - '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=" - '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=" - '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 exec 3>&1 -RESOLV=$(echo "${RESOLV}" | xargs dialog --backtitle 'FreeBSD Installer' \ +RESOLV=$(echo "${RESOLV}" | xargs -o bsddialog --backtitle 'FreeBSD Installer' \ --title 'Network Configuration' \ --mixedform 'Resolver Configuration' 0 0 0 \ 2>&1 1>&3) -if [ $? -eq $DIALOG_CANCEL ]; then exec $0; fi +if [ $? -eq $BSDDIALOG_CANCEL ]; then exec $0; fi exec 3>&- echo ${RESOLV} | tr ' ' '\n' | \