From p@i609.hadiko.de  Wed Aug 26 06:23:05 1998
Received: from nz15.rz.uni-karlsruhe.de (nz15.rz.uni-karlsruhe.de [129.13.64.15])
          by hub.freebsd.org (8.8.8/8.8.8) with SMTP id GAA28071
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 Aug 1998 06:23:03 -0700 (PDT)
          (envelope-from p@i609.hadiko.de)
Received: from nce2.hadiko.de (hadince2.hadiko.uni-karlsruhe.de [129.13.243.32])
	by nz15.rz.uni-karlsruhe.de with esmtp 
	id 0zBfWL-0003RF-00; Wed, 26 Aug 1998 15:21:53 +0200
Received: from i609.hadiko.de (hadii609.hadiko.uni-karlsruhe.de [129.13.245.204])
	by nce2.hadiko.de (8.9.0/8.9.0) with ESMTP id PAA18396
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 Aug 1998 15:21:49 +0200 (MET DST)
Received: (from p@localhost)
	by i609.hadiko.de (8.9.1/8.9.1) id PAA07432;
	Wed, 26 Aug 1998 15:22:12 +0200 (CEST)
	(envelope-from p)
Message-Id: <199808261322.PAA07432@i609.hadiko.de>
Date: Wed, 26 Aug 1998 15:22:12 +0200 (CEST)
From: p@i609.hadiko.de (Philipp Mergenthaler)
Reply-To: un1i@rz.uni-karlsruhe.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: sysinstall doesn't unmount CDROM on exiting; patch included
X-Send-Pr-Version: 3.2

>Number:         7748
>Category:       misc
>Synopsis:       sysinstall doesn't unmount CDROM on exiting; patch included
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 26 06:30:01 PDT 1998
>Closed-Date:    Mon Aug 31 09:53:31 PDT 1998
>Last-Modified:  Mon Aug 31 09:54:05 PDT 1998
>Originator:     Philipp Mergenthaler
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

	-current sources, "cvsupped" on 1998/08/26,

/usr/src/release/sysinstall%ident cdrom.c
cdrom.c:
     $Id: cdrom.c,v 1.41 1998/07/21 06:44:38 jkh Exp $

>Description:

	Sysinstall doesn't unmount the CDROM (when it has been chosen
	as installation medium), but leaves it mounted on /dist .
	This is caused by the variable cdromMounted not being set to
	TRUE when the CDROM is mounted in the function mediaInitCDROM.
	The assignement to this variable is in the wrong branch of an
	if-statement. The function mediaShutdownCDROM relies on this variable.

>How-To-Repeat:

	Start /stand/sysinstall, choose "Configure", choose "Media",
	choose "CDROM", choose "Packages". Quit sysinstall. Now
	"mount" shows, that the CDROM is still mounted on /dist .

>Fix:
	

--- cdrom.c	Wed Aug 26 13:53:30 1998
+++ cdrom.c.fixed	Wed Aug 26 14:01:57 1998
@@ -84,8 +84,9 @@
 	    msgConfirm("Error mounting %s on %s: %s (%u)", dev->devname, mountpoint, strerror(errno), errno);
 	    return FALSE;
 	}
-	cdromMounted = TRUE;
     }
+    else
+	cdromMounted = TRUE;
 
     if (!file_readable(string_concat(mountpoint, "/cdrom.inf")) && !bogusCDOK) {
 	if (msgYesNo("Warning: The CD currently in the drive is either not a FreeBSD\n"

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Mon Aug 31 09:53:31 PDT 1998 
State-Changed-Why:  
a slightly more thorough version of the patch was committed last week, 
thanks! (the inner-case was correct also). 
>Unformatted:
