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/share/mustberoot.subr | |
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/share/mustberoot.subr')
-rw-r--r-- | usr.sbin/bsdconfig/share/mustberoot.subr | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/bsdconfig/share/mustberoot.subr b/usr.sbin/bsdconfig/share/mustberoot.subr index ec3e16a..c6514c0 100644 --- a/usr.sbin/bsdconfig/share/mustberoot.subr +++ b/usr.sbin/bsdconfig/share/mustberoot.subr @@ -119,7 +119,8 @@ f_become_root_via_sudo() [ $retval -eq 255 ] && f_die $retval "$password" else - $DIALOG \ + local dialog_inputbox + dialog_inputbox=$( $DIALOG \ --title "$DIALOG_TITLE" \ --backtitle "$DIALOG_BACKTITLE" \ --hline "$hline" \ @@ -127,8 +128,10 @@ f_become_root_via_sudo() --cancel-label "$msg_cancel" \ --insecure \ --passwordbox "$msg" $size \ - 2> "$DIALOG_TMPDIR/dialog.inputbox.$$" + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) retval=$? + setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox" password=$( f_dialog_inputstr ) fi |