From judgea@brazil.eng.eircom.net  Tue Sep 11 03:56:14 2001
Return-Path: <judgea@brazil.eng.eircom.net>
Received: from brazil.eng.eircom.net (brazil.eng.eircom.net [159.134.242.211])
	by hub.freebsd.org (Postfix) with ESMTP
	id CC73037B411; Tue, 11 Sep 2001 03:56:13 -0700 (PDT)
Received: (from judgea@localhost)
	by brazil.eng.eircom.net (8.11.6/8.11.5) id f8BAuCL48105;
	Tue, 11 Sep 2001 11:56:12 +0100 (IST)
	(envelope-from judgea)
Message-Id: <200109111056.f8BAuCL48105@brazil.eng.eircom.net>
Date: Tue, 11 Sep 2001 11:56:12 +0100 (IST)
From: Alan Judge <Alan.Judge@eircom.net>
Reply-To: Alan Judge <Alan.Judge@eircom.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: re@freebsd.org, Alan.Judge@eircom.net
Subject: STABLE sysinstall scripted installs broken since 2001/08/31
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         30508
>Category:       bin
>Synopsis:       STABLE sysinstall scripted installs broken since 2001/08/31
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    jkh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 11 04:00:00 PDT 2001
>Closed-Date:    Tue Sep 11 13:44:03 PDT 2001
>Last-Modified:  Tue Sep 11 13:44:15 PDT 2001
>Originator:     Alan Judge
>Release:        FreeBSD 4.4-RC i386
>Organization:
eircom.net
>Environment:
System: FreeBSD brazil.eng.eircom.net 4.4-BRAZIL-0.62-BETA FreeBSD 4.4-BRAZIL-0.62-BETA #0: Thu Sep 6 13:35:07 GMT 2001 judgea@brazil.eng.eircom.net:/usr/src/sys/compile/BRAZIL-DEV-SMP i386

	Tracking RELENG_4 and building custom releases for production
	environment.

>Description:
	A recent patch to release/sysinstall/msg.c by jkh has broken scripted
	installs.  I think the comments in msg.c are wrong leading to the wrong
	code being committed for non-interactive installs.

	It seems msgYesNo follows the dialog DITEM_SUCCESS/FAILURE model and
	returns 0 for success and 1 for failure.

>How-To-Repeat:
	Attempt a scripted install using a config file.
	installCommit fails quickly.

>Fix:

	Patch below against STABLE.

	I'm building a new test release now, but given the approaching
	release thought it best to file rapidly so this can be
	fixed before 4.4 ships.  I'll followup to the PR once I've
	tested my new CD.

	I'd request an immediate commit to STABLE if this looks ok.

Index: release/sysinstall/msg.c
===================================================================
RCS file: /f5/misc/FreeBSD/cvs/src/release/sysinstall/Attic/msg.c,v
retrieving revision 1.52.2.3
diff -u -r1.52.2.3 msg.c
--- msg.c	2001/08/31 19:43:56	1.52.2.3
+++ msg.c	2001/09/11 10:33:55
@@ -218,7 +218,7 @@
     dialog_msgbox(NULL, errstr, -1, -1, 0);
 }
 
-/* Put up a message in a popup yes/no box and return 1 for YES, 0 for NO */
+/* Put up a message in a popup yes/no box and return 0 for YES, 1 for NO */
 int
 msgYesNo(char *fmt, ...)
 {
@@ -238,13 +238,13 @@
 	msgInfo(NULL);
     }
     if (variable_get(VAR_NONINTERACTIVE))
-	return 1;	/* If non-interactive, return YES all the time */
+	return 0;	/* If non-interactive, return YES all the time */
     ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
     restorescr(w);
     return ret;
 }
 
-/* Put up a message in a popup no/yes box and return 1 for YES, 0 for NO */
+/* Put up a message in a popup no/yes box and return 0 for YES, 1 for NO */
 int
 msgNoYes(char *fmt, ...)
 {
@@ -264,7 +264,7 @@
 	msgInfo(NULL);
     }
     if (variable_get(VAR_NONINTERACTIVE))
-	return 0;	/* If non-interactive, return NO all the time */
+	return 1;	/* If non-interactive, return NO all the time */
     ret = dialog_noyes("User Confirmation Requested", errstr, -1, -1);
     restorescr(w);
     return ret;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jkh 
Responsible-Changed-By: roam 
Responsible-Changed-When: Tue Sep 11 04:06:35 PDT 2001 
Responsible-Changed-Why:  
sysinstall is mainly his, and  this really does seem critical 
in view of the impending release. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30508 

From: Alan Judge <Alan.Judge@eircom.net>
To: freebsd-gnats-submit@FreeBSD.org, Alan.Judge@eircom.net
Cc:  
Subject: Re: bin/30508: STABLE sysinstall scripted installs broken since 
 2001/08/31
Date: Tue, 11 Sep 2001 18:34:40 +0100

 Just to confirm: I've now tested, between being sickened by the events
 on TV, and
 this patch fixes my problem with scripted installs.
 
 A.
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Tue Sep 11 13:44:03 PDT 2001 
State-Changed-Why:  
Thanks, fixed! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30508 
>Unformatted:
