aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bsdconfig/console/repeat
diff options
context:
space:
mode:
authorDevin Teske <dteske@FreeBSD.org>2012-09-20 23:44:13 +0000
committerDevin Teske <dteske@FreeBSD.org>2012-09-20 23:44:13 +0000
commit89498fdf4174b08bb67d684d14886539aff698b4 (patch)
tree6eb395555fa780676e51155e913c807210bdc403 /usr.sbin/bsdconfig/console/repeat
parentec9b9fbd50873f8ee7072f2e81cdced8d167f11b (diff)
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)
Notes
Notes: svn path=/head/; revision=240768
Diffstat (limited to 'usr.sbin/bsdconfig/console/repeat')
-rwxr-xr-xusr.sbin/bsdconfig/console/repeat9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/bsdconfig/console/repeat b/usr.sbin/bsdconfig/console/repeat
index 87f1e3c840b0..76d60d119105 100755
--- a/usr.sbin/bsdconfig/console/repeat
+++ b/usr.sbin/bsdconfig/console/repeat
@@ -66,7 +66,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\" \
@@ -74,7 +75,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
}
############################################################ MAIN