From nobody@FreeBSD.org  Sat Aug 27 18:38:42 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 047C5106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Aug 2011 18:38:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id E86D58FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Aug 2011 18:38:41 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p7RIcfc6080356
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Aug 2011 18:38:41 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p7RIcfd4080355;
	Sat, 27 Aug 2011 18:38:41 GMT
	(envelope-from nobody)
Message-Id: <201108271838.p7RIcfd4080355@red.freebsd.org>
Date: Sat, 27 Aug 2011 18:38:41 GMT
From: "Domagoj Smol&#269;i&#263;" <rank1seeker@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: rc.d/mdconfig(2) should autoset $_type to vnode, when only -f is passed
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         160240
>Category:       conf
>Synopsis:       rc.d/mdconfig and mdconfig2 should autoset $_type to vnode, when only -f is passed
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-rc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 27 18:40:10 UTC 2011
>Closed-Date:    
>Last-Modified:  Sat Aug 27 18:44:03 UTC 2011
>Originator:     Domagoj Smol&#269;i&#263;
>Release:        8.2
>Organization:
>Environment:
FreeBSD blackhole.starforce.biz 8.2-RELEASE-p2 FreeBSD 8.2-RELEASE-p2 #0: Wed Jun  1 16:27:50 CEST 2011     root@blackhole.starforce.biz:/usr/obj/usr/src/sys/BLACKHOLE  i386
>Description:
If mdconfig bin, is now smart enough to load vnode images, via:
# mdconfig -f /usr/my.img
As options '-a' and '-t vnode' are implied, instead old:
# mdconfig -a -t vnode -f /usr/my.img

Then why scripts:
--
/etc/rc.d/mdconfig
/etc/rc.d/mdconfig2
--
Aren't aware of this?


This would fail: (rc.conf)
mdconfig_md0="-f /usr/my.img"

Because "${_type}" variable gets value '-f'

dmesg: ()
--
Creating md0 device (-f).
mdconfig:
could not open /usr/my.img
:
No such file or directory
Creating md0 device failed, moving on.
Mounting local file systems:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Aug 27 18:43:43 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

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