diff options
author | dteske <dteske@FreeBSD.org> | 2012-09-20 23:44:13 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2012-09-20 23:44:13 +0000 |
commit | f628c47944e7370c8d8c16cdcc6f98871a48be02 (patch) | |
tree | 6eb395555fa780676e51155e913c807210bdc403 /usr.sbin/bsdconfig/startup/misc | |
parent | 3a2b0e2811fa295dd198978ef2dcb53b37c2570d (diff) | |
download | FreeBSD-src-f628c47944e7370c8d8c16cdcc6f98871a48be02.zip FreeBSD-src-f628c47944e7370c8d8c16cdcc6f98871a48be02.tar.gz |
Change all invocations of dialog(1) to no-longer require temporary files.
This allows bsdconfig to -- like bsdinstall -- operate from read-only media.
Reviewed by: adrian (co-mentor)
Approved by: adrian (co-mentor)
Diffstat (limited to 'usr.sbin/bsdconfig/startup/misc')
-rwxr-xr-x | usr.sbin/bsdconfig/startup/misc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.sbin/bsdconfig/startup/misc b/usr.sbin/bsdconfig/startup/misc index f4a0e1a..3879c57 100755 --- a/usr.sbin/bsdconfig/startup/misc +++ b/usr.sbin/bsdconfig/startup/misc @@ -230,7 +230,8 @@ dialog_menu_main() \"\$hline\" \ $menu_list ) - eval $DIALOG \ + local dialog_menu + dialog_menu=$( eval $DIALOG \ --clear --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ --hline \"\$hline\" \ @@ -238,7 +239,11 @@ dialog_menu_main() --cancel-label \"\$msg_cancel\" \ --menu \"\$prompt\" $size \ $menu_list \ - 2> "$DIALOG_TMPDIR/dialog.menu.$$" + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + local retval=$? + setvar DIALOG_MENU_$$ "$dialog_menu" + return $retval } # dialog_input_value [ $prompt [ $init ] ] @@ -260,7 +265,8 @@ dialog_input_value() "$_input" \ "$hline" ) - eval $DIALOG \ + local dialog_inputbox + dialog_inputbox=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ --hline \"\$hline\" \ @@ -268,9 +274,11 @@ dialog_input_value() --cancel-label \"\$msg_cancel\" \ --inputbox \"\$prompt\" $size \ \"\$_input\" \ - 2> $DIALOG_TMPDIR/dialog.inputbox.$$ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) retval=$? + setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox" _input=$( f_dialog_inputstr ) f_dialog_title_restore |