[Bug 202058] bsdinstall - Disable dialog(3) for distfetch/checksum/distextract targets
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Nov 24 20:24:43 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202058
Devin Teske <dteske at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dteske at FreeBSD.org
--- Comment #4 from Devin Teske <dteske at FreeBSD.org> ---
Apologies for not picking this up off of -sysinstall@ (I'm sure I was CC'd, but
I am quite a busy gal).
Using "nonInteractive" to achieve what you want is not historically accurate
with the use of the variable in both bsdconfig and sysinstall.
In bsdconfig, you can see its use by executing the following:
$ grep -nrs --color '\(VAR_NONINTERACTIVE\|nonInteractive\)'
/usr/share/bsdconfig
And for sysinstall (from base/stable/9/usr.sbin/sysinstall/):
$ grep -Inrs --color '\(VAR_NONINTERACTIVE\|nonInteractive\)'
~/src/freebsd_svn/base/stable/9/usr.sbin/sysinstall
NB: You may have your stable/9 sources elsewhere
And for bsdinstall
grep -Inrs --color '\(VAR_NONINTERACTIVE\|nonInteractive\)'
/usr/libexec/bsdinstall
Any grep above should indicate that VAR_NONINTERACTIVE (nonInteractive;
configurable in source) doesn't actually disable dialog. It disables prompts
for information.
That is to explain:
When nonInteractive is NULL or unset, you can be prompted.
When nonInteractive is set and non-NULL (e.g., 1), you'll get an error if
required information is not provided in your script.
NB: sysinstall was essentially split in twain; install bits to bsdinstall,
configure bits to bsdconfig.
I'm all-for teaching bsdinstall to use $nonInteractive more often. However, its
purpose is not to disable dialog, just disable prompts which can hang up
scripts because nobody is there to answer the prompt.
ASIDE: By the way, I'm super impressed that your patch included the use of
DPV_DISPLAY_STDOUT ;D (you're thorough, and I like that).
Getting back to the issue at-hand...
I think the appropriate solution is to:
1. Add support for HAVE_DIALOG (see SVN r307802 -- link below)
NB: That will dove-tail nicely into the following work(s)...
https://svnweb.freebsd.org/base?view=revision&revision=307802 [bapt+emaste]
https://svnweb.freebsd.org/base?view=revision&revision=306648 [emaste]
https://svnweb.freebsd.org/base?view=revision&revision=306375 [emaste+dteske]
2. Use printf when HAVE_DIALOG is unset
and optionally...
3. Add a command-line flag that inhibits the use of dialog in the same manner
as using WITHOUT_DIALOG to compile-out the HAVE_DIALOG sections.
You can see from the above SVN revisions:
a. First came r306375; we wanted to introduce WITHOUT_DIALOG; that caused us to
have to disable bsdinstall, bsdconfig, dpv, and tzsetup
b. However, bapt made tzsetup work without dialog in SVN r307802 paving the way
to have it re-enabled permanently
And you've correctly identified that both dpv(3) and dpv(1) support non-dialog
interfaces (e.g., stdout via DPV_DISPLAY_STDOUT for dpv(3) and for dpv(1), the
`-d' flag).
If, with your help, we can add "#ifdef HAVE_DIALOG" support to the bsdinstall
components that you correctly identified as needing it (distfetch, checksum,
and distextract) and I help fix all the shell code, we could get these
components working in a dialog-less world.
What do you think?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-sysinstall
mailing list