Date: Thu, 24 Nov 2016 20:24:41 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-sysinstall@FreeBSD.org Subject: [Bug 202058] bsdinstall - Disable dialog(3) for distfetch/checksum/distextract targets Message-ID: <bug-202058-2920-tUQfgbe9Fr@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-202058-2920@https.bugs.freebsd.org/bugzilla/> References: <bug-202058-2920@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202058 Devin Teske <dteske@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dteske@FreeBSD.org --- Comment #4 from Devin Teske <dteske@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-202058-2920-tUQfgbe9Fr>
