mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
bsdinstall: Fix command line argument list parsing
bsddialog(1) uses getopt_long(3) to parse command line argument list. Add '--' to avoid errors caused by arguments (menu items) begin with '-'. The change is compatible with dialog(1) and Xdialog(1).
This commit is contained in:
parent
7cff9672de
commit
8df9efe877
|
@ -195,7 +195,7 @@ while :; do
|
|||
--default-item \"\$defaultitem\" \
|
||||
--menu \"\$prompt\" \
|
||||
$height $width $rows \
|
||||
$menu_list \
|
||||
${USE_DIALOG:+--} $menu_list \
|
||||
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
|
||||
) || {
|
||||
f_quietly rm -f "$KEYMAPFILE"
|
||||
|
|
|
@ -396,7 +396,7 @@ dialog_menu_main()
|
|||
--default-item \"\$defaultitem\" \
|
||||
--menu \"\$prompt\" \
|
||||
$height $width $rows \
|
||||
$menu_list \
|
||||
${USE_DIALOG:+--} $menu_list \
|
||||
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
|
||||
)
|
||||
local retval=$?
|
||||
|
|
Loading…
Reference in a new issue