summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorabial <abial@FreeBSD.org>1999-01-08 21:00:26 +0000
committerabial <abial@FreeBSD.org>1999-01-08 21:00:26 +0000
commitf4a65bb45d4b46d0457e11f845fe423763c73c0d (patch)
treec7ca356bee64ac1f56eaad9fd04f614881c9f5ff /sys
parentb823adf4bef0aa373c7a9080c22e20b7bc2fc081 (diff)
downloadFreeBSD-src-f4a65bb45d4b46d0457e11f845fe423763c73c0d.zip
FreeBSD-src-f4a65bb45d4b46d0457e11f845fe423763c73c0d.tar.gz
Fix faulty logic in handling userconfig_script, INTRO_USERCONFIG and
RB_CONFIG. Now, the code should do the right thing in the following cases, when kernel is compiled with INTRO_USERCONFIG: * when booted without userconfig_script and without RB_CONFIG, present intro screen, and wait for user input. * when booted with userconfig_script and without RB_CONFIG, DON'T present intro screen unless explicitly asked in userconfig_script, basing on assumption that if a user loads userconfig_script, (s)he already decided what parameters to configure. Proceed with booting. * when booted without userconfig_script, and with RB_CONFIG, enter configuration utility and wait for user input. * when booted with userconfig_script, and with RB_CONFIG, execute all commands from userconfig_script, and DON'T leave the config utility, but wait for user input. And finally, regardless of the combination of the above parameters, when intro screen is invoked either first or next times, and user chooses to go back to CLI interface, unblock the quit command.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/userconfig.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c
index 1dba634..a822f86 100644
--- a/sys/i386/i386/userconfig.c
+++ b/sys/i386/i386/userconfig.c
@@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
- ** $Id: userconfig.c,v 1.119 1999/01/06 09:09:22 abial Exp $
+ ** $Id: userconfig.c,v 1.120 1999/01/07 09:49:28 abial Exp $
**/
/**
@@ -239,14 +239,22 @@ getchar(void)
* script (userconfig_boot_parsing==1), otherwise
* we would always block here waiting for user input.
*/
+ intro = 1;
if (userconfig_boot_parsing == 0)
{
- intro = 1;
+ /* userconfig_boot_parsing will be set to 1 on next pass,
+ * which will allow using 'intro' in the middle of other
+ * userconfig_script commands.
+ */
c = 'i';
asp = "ntro\n";
assize = strlen(asp);
+ } else {
+ userconfig_boot_parsing = 0;
+ assize=-1;
}
#else
+ userconfig_boot_parsing = 0;
if (!(boothowto & RB_CONFIG))
{
/* don't want to drop to interpreter */
@@ -2507,7 +2515,7 @@ visuserconfig(void)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: userconfig.c,v 1.119 1999/01/06 09:09:22 abial Exp $
+ * $Id: userconfig.c,v 1.120 1999/01/07 09:49:28 abial Exp $
*/
#include "scbus.h"
@@ -3142,6 +3150,8 @@ introfunc(CmdParm *parms)
return visuserconfig();
else {
putxy(0, 1, "Type \"help\" for help or \"quit\" to exit.");
+ /* enable quitfunc */
+ userconfig_boot_parsing=0;
move (0, 3);
boothowto |= RB_CONFIG; /* force -c */
return 0;
OpenPOWER on IntegriCloud