NetBSD Problem Report #8431

Received: (qmail 3021 invoked from network); 17 Sep 1999 18:26:11 -0000
Message-Id: <199909171826.LAA11523@nooksack.ldc.cs.wwu.edu>
Date: Fri, 17 Sep 1999 11:26:17 -0700 (PDT)
From: johnr@imageworks.com
Reply-To: johnr@imageworks.com
To: gnats-bugs@gnats.netbsd.org
Subject: mount should have option to not return failure error code if already mounted
X-Send-Pr-Version: www-1.0

>Number:         8431
>Category:       bin
>Synopsis:       mount should have option to not return failure error code if already mounted
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 17 11:35:01 +0000 1999
>Closed-Date:    
>Last-Modified:  Wed May 10 09:12:01 +0000 2000
>Originator:     John Refling
>Release:        1.4.1
>Organization:
>Environment:
sparc classic

>Description:
In two cases in the install script, mount can fail when the drive
is already mounted.  There should be an option in mount so that it
can return a non-failure error code even if the requested operation did
not complete, but the end result was correct.

Ie, mount /dev/wd0a /mnt

fails if /dev/wd0a is already mounted on /mnt, but it is clear that
additional operations in the script after the mount operation can
proceed properly.

The two cases where this fails in the install script are:

1)  If the install script is run a second or more time, things are
    still mounted from previous attempts.

2)  If the distribution sets are specified as being located on a
    local drive and that drive can't be mounted since it already
    is mounted.  [I had unofficially asked for a "install from local
    mounted drive" option in install a while ago (I think it's in
    some ports, but not in others)]


>How-To-Repeat:


>Fix:


>Release-Note:
>Audit-Trail:

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: johnr@imageworks.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/8431: mount should have option to not return failure error code if already mounted
Date: Sun, 19 Sep 1999 16:41:29 +0200

 On Fri, Sep 17, 1999 at 11:26:17AM -0700, johnr@imageworks.com wrote:
 > >Description:
 > In two cases in the install script, mount can fail when the drive
 > is already mounted.  There should be an option in mount so that it
 > can return a non-failure error code even if the requested operation did
 > not complete, but the end result was correct.
 > 
 > Ie, mount /dev/wd0a /mnt
 > 
 > fails if /dev/wd0a is already mounted on /mnt, but it is clear that
 > additional operations in the script after the mount operation can
 > proceed properly.

 IMHO the script should check for this before calling mount.

 --
 Manuel Bouyer <bouyer@antioche.eu.org>
 --

From: Darren Reed <darrenr@reed.wattle.id.au>
To: johnr@imageworks.com, bouyer@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: bin/8431 - mount should have option to not return failure error code if already mounted
Date: Sat, 6 May 2000 16:54:29 +1000 (EST)

 Is this still a problem ?

 Running 1.4X, from my root shell prompt:

 # mount /dev/wd0a
 # echo $?
 0
 # mount /dev/wd0a
 # echo $?
 0
 # mount /dev/wd0a
 # echo $?
 0
 # mount /dev/wd0a
 # echo $?
 0

 ...or is it just a problem when using mount from the install disks ?

 Darren

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Darren Reed <darrenr@reed.wattle.id.au>
Cc: johnr@imageworks.com, gnats-bugs@gnats.netbsd.org
Subject: Re: bin/8431 - mount should have option to not return failure error code if already mounted
Date: Wed, 10 May 2000 11:10:57 +0200

 On Sat, May 06, 2000 at 04:54:29PM +1000, Darren Reed wrote:
 > 
 > Is this still a problem ?
 > 
 > Running 1.4X, from my root shell prompt:
 > 
 > # mount /dev/wd0a
 > # echo $?
 > 0
 > # mount /dev/wd0a
 > # echo $?
 > 0
 > # mount /dev/wd0a
 > # echo $?
 > 0
 > # mount /dev/wd0a
 > # echo $?
 > 0
 > 
 > ...or is it just a problem when using mount from the install disks ?

 I think the problem is:
 antifer# mount /dev/sd1d /magn
 antifer# mount /dev/sd1d /magn
 mount_ffs: /dev/sd1d on /magn: Device busy
 antifer# echo $status
 1

 This needs to be solved at the install tools level.

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 --
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.