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/timezone | |
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/timezone')
-rwxr-xr-x | usr.sbin/bsdconfig/timezone/timezone | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/usr.sbin/bsdconfig/timezone/timezone b/usr.sbin/bsdconfig/timezone/timezone index f785a75..02626a6 100755 --- a/usr.sbin/bsdconfig/timezone/timezone +++ b/usr.sbin/bsdconfig/timezone/timezone @@ -91,14 +91,19 @@ dialog_menu_main() \"\" \ $continent_menu_list ) - eval $DIALOG \ + local dialog_menu + dialog_menu=$( eval $DIALOG \ --title \"\$title\" \ --backtitle \"\$btitle\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --menu \"\$prompt\" $size \ $continent_menu_list \ - 2> "$DIALOG_TMPDIR/dialog.menu.$$" + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + local retval=$? + setvar DIALOG_MENU_$$ "$dialog_menu" + return $retval } ############################################################ MAIN @@ -354,15 +359,17 @@ while :; do # # Launch the country selection menu # - eval $DIALOG \ + dialog_menu=$( eval $DIALOG \ --title \"\$title\" \ --backtitle \"\$btitle\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --menu \"\$prompt\" $size \ $menu_list \ - 2> "$DIALOG_TMPDIR/dialog.menu.$$" + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) retval=$? + setvar DIALOG_MENU_$$ "$dialog_menu" tag=$( f_dialog_menutag ) if [ $retval -ne 0 ]; then @@ -409,15 +416,17 @@ while :; do # Launch the zone selection menu # NOTE: This is as deep as we go # - eval $DIALOG \ + dialog_menu=$( eval $DIALOG \ --title \"\$title\" \ --backtitle \"\$btitle\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --menu \"\$prompt\" $size \ $menu_list \ - 2> "$DIALOG_TMPDIR/dialog.menu.$$" + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) retval=$? + setvar DIALOG_MENU_$$ "$dialog_menu" n=$( f_dialog_menutag ) if [ $retval -ne 0 ]; then |