From owner-svn-src-head@freebsd.org Tue Dec 13 01:35:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B34CCC7468C; Tue, 13 Dec 2016 01:35:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66442CE5; Tue, 13 Dec 2016 01:35:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBD1ZQ00041908; Tue, 13 Dec 2016 01:35:26 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBD1ZQPn041907; Tue, 13 Dec 2016 01:35:26 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612130135.uBD1ZQPn041907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Dec 2016 01:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309963 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 01:35:27 -0000 Author: dteske Date: Tue Dec 13 01:35:26 2016 New Revision: 309963 URL: https://svnweb.freebsd.org/changeset/base/309963 Log: The --no-items and --stdout options are non-standard and should be avoided From the dialog(1) manual: using [--stdout] in portable scripts is not recommended Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig ============================================================================== --- head/usr.sbin/bsdinstall/scripts/wlanconfig Tue Dec 13 00:27:56 2016 (r309962) +++ head/usr.sbin/bsdinstall/scripts/wlanconfig Tue Dec 13 01:35:26 2016 (r309963) @@ -90,8 +90,13 @@ dialog_country_select() # Parse available countries/regdomains # input=$( ifconfig "$WLAN_IFACE" list countries | sed -e 's/DEBUG//gi' ) - regdomains=$( echo $input | sed -e 's/.*domains://' | tr ' ' '\n' | - sort | tr '\n' ' ' ) + regdomains=$( echo "$input" | awk ' + sub(/.*domains:/, ""), /[^[:alnum:][[:space:]]/ { + n = split($0, domains) + for (i = 1; i <= n; i++) + printf "'\''%s'\'' '\'\''", domains[i] + } + ' ) countries=$( echo "$input" | awk ' sub(/Country codes:/, ""), sub(/Regulatory.*/, "") { while (match($0, /[[:upper:]][[:upper:][:digit:]] /)) { @@ -108,17 +113,18 @@ dialog_country_select() f_dialog_title "Regdomain selection" prompt="Select your regdomain." - f_dialog_menu_size height width rows "$DIALOG_TITLE" \ - "$DIALOG_BACKTITLE" "$prompt" "" $regdomains - regdomain=$( sh -c "$DIALOG \ - --title \"$DIALOG_TITLE\" \ - --backtitle \"$DIALOG_BACKTITLE\" \ - --cancel-label \"$msg_skip\" \ - --default-item \"$default_regdomain\" \ - --no-items \ - --stdout \ - --menu \"$prompt\" \ - $height $width $rows $regdomains" + eval f_dialog_menu_size height width rows \ + \"\$DIALOG_TITLE\" \"\$DIALOG_BACKTITLE\" \ + \"\$prompt\" \"\" $regdomains + regdomain=$( eval $DIALOG \ + --title \"\$DIALOG_TITLE\" \ + --backtitle \"\$DIALOG_BACKTITLE\" \ + --cancel-label \"\$msg_skip\" \ + --default-item \"\$default_regdomain\" \ + --menu \"\$prompt\" \ + $height $width $rows \ + $regdomains \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) f_dialog_title "Country selection"