Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2000 12:13:01 -0500 (EST)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        freebsd-questions@FreeBSD.ORG (FreeBSD Questions)
Subject:   Bug or Feature: Cannot umount by Symlink
Message-ID:  <200001121713.MAA11160@cc942873-a.ewndsr1.nj.home.com>

next in thread | raw e-mail | index | archive | help
Before I put in a PR, I wanted to ask if anyone was aware why the
following behavior might be a desired feature rather than a bug.

For asthetic reasons, I like to have all "real" mounts of removable
devices under the /mnt directory. So, I have,

# ls -l /mnt
total 4
drwxrwxr-x  2 root  wheel  512 Oct 13  1998 cdrom
drwxrwxr-x  2 root  wheel  512 Aug 24 15:07 floppy
drwxrwxr-x  2 root  wheel  512 Sep 23 17:22 jaz
drwxrwxr-x  2 root  wheel  512 Feb 10  1999 tmp

But many programs (including the FreeBSD sysinstall) expect a CDROM to
be mounted at /cdrom. So I have,

# ls -l /cdrom
lrwxrwxr-x  1 root  wheel  10 Oct 13  1998 /cdrom -> /mnt/cdrom

Now, the feature/bug is the following,

# mount /cdrom
# umount /cdrom
umount: /cdrom: not currently mounted

That is, mount(8) can handle mounting at a valid (it points to a valid
mount point) symlink, but umount(8) does not seem to handle it.

Now, if the bahavior of umount(8) is intentional for security or other
reasons, shouldn't mount(8) be the same way (and as far as security
goes, generally mount is the one I a more concerned with)? On the
other hand, if there is no reason not to add the extra flexibilty of
using symlinks, shouldn't umount(8) be able to handle that command
line?

Thanks for any insights. If it is a bug, one way or the other, I'll
send in a PR unless someone beats me to it (and please beat me to it
if you know how to write the fix).
-- 
Crist J. Clark                           cjclark@home.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001121713.MAA11160>