summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/console/screenmap
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2012-09-20 23:44:13 +0000
committerdteske <dteske@FreeBSD.org>2012-09-20 23:44:13 +0000
commitf628c47944e7370c8d8c16cdcc6f98871a48be02 (patch)
tree6eb395555fa780676e51155e913c807210bdc403 /usr.sbin/bsdconfig/console/screenmap
parent3a2b0e2811fa295dd198978ef2dcb53b37c2570d (diff)
downloadFreeBSD-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/console/screenmap')
-rwxr-xr-xusr.sbin/bsdconfig/console/screenmap9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/bsdconfig/console/screenmap b/usr.sbin/bsdconfig/console/screenmap
index ddcaec8..bdabe6a 100755
--- a/usr.sbin/bsdconfig/console/screenmap
+++ b/usr.sbin/bsdconfig/console/screenmap
@@ -68,7 +68,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\" \
@@ -76,7 +77,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
OpenPOWER on IntegriCloud