From eugen@grosbein.pp.ru  Sun Aug 30 14:53:34 2009
Return-Path: <eugen@grosbein.pp.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C0BFF1065693
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 30 Aug 2009 14:53:34 +0000 (UTC)
	(envelope-from eugen@grosbein.pp.ru)
Received: from grosbein.pp.ru (grosbein.pp.ru [89.189.172.146])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F5128FC1C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 30 Aug 2009 14:53:32 +0000 (UTC)
Received: from grosbein.pp.ru (localhost [127.0.0.1])
	by grosbein.pp.ru (8.14.3/8.14.3) with ESMTP id n7UErSwc071422
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 30 Aug 2009 22:53:28 +0800 (KRAST)
	(envelope-from eugen@grosbein.pp.ru)
Received: (from eugen@localhost)
	by grosbein.pp.ru (8.14.3/8.14.3/Submit) id n7UErS76071421;
	Sun, 30 Aug 2009 22:53:28 +0800 (KRAST)
	(envelope-from eugen)
Message-Id: <200908301453.n7UErS76071421@grosbein.pp.ru>
Date: Sun, 30 Aug 2009 22:53:28 +0800 (KRAST)
From: Eugene Grosbein <eugen@grosbein.pp.ru>
Reply-To: Eugene Grosbein <eugen@grosbein.pp.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] [nanobsd] nanobsd build is broken due to mdconfig(8) change
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         138347
>Category:       misc
>Synopsis:       [patch] [nanobsd] nanobsd build is broken due to mdconfig(8) change
>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:   Sun Aug 30 15:00:08 UTC 2009
>Closed-Date:    Sun Apr 25 18:29:19 UTC 2010
>Last-Modified:  Sun Apr 25 18:29:19 UTC 2010
>Originator:     Eugene Grosbein
>Release:        FreeBSD 8.0-BETA3 i386
>Organization:
private person
>Environment:
System: FreeBSD grosbein.pp.ru 8.0-BETA3 FreeBSD 8.0-BETA3 #6: Fri Aug 28 22:34:15 KRAST 2009 eugen@grosbein.pp.ru:/usr/local/obj/usr/local/src/sys/DADV i386

>Description:
	After http://www.freebsd.org/cgi/query-pr.cgi?pr=116177,
	mdconfig returns non-zero exit status if called for non-existing
	device. This reveals a bug of src/tools/tools/nanobsd/nanobsd.sh
	sitting here from revision 1.1: inside create_i386_diskimage(),
	it does "mdconfig -d -u $MD" as last statement
	then runs the same command again as part of "trap ... EXIT" procedure
	and fails due to not masked non-zero exit status

>How-To-Repeat:
	Try to build nanobsd.

>Fix:

	Remove extra mdconfig call:

--- tools/tools/nanobsd/nanobsd.sh.orig	2009-08-30 22:39:54.000000000 +0800
+++ tools/tools/nanobsd/nanobsd.sh	2009-08-30 22:40:00.000000000 +0800
@@ -490,7 +490,6 @@
 
 	echo "Writing out _.disk.image..."
 	dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
-	mdconfig -d -u $MD
 	) > ${NANO_OBJ}/_.di 2>&1
 )
 


>Release-Note:
>Audit-Trail:

From: Eugene Grosbein <eugen@grosbein.pp.ru>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: misc/138347: [patch] [nanobsd] nanobsd build is broken due to
 mdconfig(8) change
Date: Mon, 26 Apr 2010 00:40:02 +0700

 Hi!
 
 The problem was solved in RELENG_8 with the revision 1.51.2.2
 of  src/tools/tools/nanobsd/nanobsd.sh (it now removes trap handler
 so double mdconfig call is avoided).
 
 Please close this PR.
 
 Eugene Grosbein
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Apr 25 18:29:05 UTC 2010 
State-Changed-Why:  
Apparently fixed in RELENG_8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=138347 
>Unformatted:
