diff options
author | dteske <dteske@FreeBSD.org> | 2014-04-18 00:48:26 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2014-04-18 00:48:26 +0000 |
commit | 6d543d996b00cd77406db47afe2f64b81e19f9f0 (patch) | |
tree | 2aede581013d9de7c95c8be59764efd33ab06e0b | |
parent | 2e8b45c43c9443e7c53d72567c86cd2f55834049 (diff) | |
download | FreeBSD-src-6d543d996b00cd77406db47afe2f64b81e19f9f0.zip FreeBSD-src-6d543d996b00cd77406db47afe2f64b81e19f9f0.tar.gz |
MFC r264488:
When merging docsinstall and zfsboot updates to stable/9 it was discovered
that the slightly older dialog(1) requires --separate-output when using the
--checklist widget to force response to produce unquoted values (whereas in
stable/10 --checklist widget without --separate-output will only quote the
checklist labels in the response if the label is multi-word (contains any
whitespace).
Since these enhancements (see revisions 263956 and 264437) were developed
originally on 10, the --separate-output option was omitted. When merged to
stable/9, we (Allan Jude) and I found during testing that the "always-
quoting" of the response was causing things like struct interpolation to
fail (`f_struct device_$dev' would produce `f_struct device_\"da0\"' for
example -- literal quotes inherited from dialog(1) --checklist response).
To see the behavior, execute the following on stable/9 versus stable/10:
dialog --checklist disks: 0 0 0 da0 "" off da1 "" off
Check both items and hit enter. On stable/10, the response is:
da0 da1
On stable/9 the response is:
"da0" "da1"
If you use the --separate-output option, the response is the same for both:
da0
da1
So applying --separate-output on every platform until either one of two
things occurs 1) dialog(1,3) gets synchronized between stable/9, higher or
2) we drop support for stable/9.
Reviewed by: Allan Jude
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/docsinstall | 1 | ||||
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/zfsboot | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/bsdinstall/scripts/docsinstall b/usr.sbin/bsdinstall/scripts/docsinstall index 2e893b5..f0bc8f5 100755 --- a/usr.sbin/bsdinstall/scripts/docsinstall +++ b/usr.sbin/bsdinstall/scripts/docsinstall @@ -119,6 +119,7 @@ dialog_menu_main() selected=$( eval $DIALOG \ --title \"\$title\" \ --backtitle \"\$btitle\" \ + --separate-output \ --hline \"\$hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index d2e0375..e148da2 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -581,6 +581,7 @@ dialog_menu_layout() selections=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ + --separate-output \ --hline \"\$hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_back\" \ |