Date: Mon, 7 Jan 2013 00:15:52 +0000 (UTC) From: Devin Teske <dteske@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245116 - head/usr.sbin/bsdconfig/share Message-ID: <50ea13b8.1d1b.4bd5285d@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Mon Jan 7 00:15:52 2013 New Revision: 245116 URL: http://svnweb.freebsd.org/changeset/base/245116 Log: Add nonInteractive support to f_dialog_yesno/noyes(). Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Sun Jan 6 22:15:44 2013 (r245115) +++ head/usr.sbin/bsdconfig/share/dialog.subr Mon Jan 7 00:15:52 2013 (r245116) @@ -32,6 +32,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." dialog.subr f_include $BSDCFG_SHARE/strings.subr +f_include $BSDCFG_SHARE/variable.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" f_include_lang $BSDCFG_LIBE/include/messages.subr @@ -1058,6 +1059,9 @@ f_dialog_yesno() { local msg_text="$*" local hline="$hline_arrows_tab_enter" + + f_interactive || return 0 # If non-interactive, return YES all the time + local size="$( f_dialog_buttonbox_size \ "$DIALOG_TITLE" \ "$DIALOG_BACKTITLE" \ @@ -1098,6 +1102,9 @@ f_dialog_noyes() { local msg_text="$*" local hline="$hline_arrows_tab_enter" + + f_interactive || return 1 # If non-interactive, return NO all the time + local size="$( f_dialog_buttonbox_size \ "$DIALOG_TITLE" \ "$DIALOG_BACKTITLE" \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50ea13b8.1d1b.4bd5285d>