bin/84298: [patch] allow mount(8) to recognize relative
pathnames as mountpoints
Brooks Davis
brooks at one-eyed-alien.net
Fri Jul 29 16:10:26 GMT 2005
The following reply was made to PR bin/84298; it has been noted by GNATS.
From: Brooks Davis <brooks at one-eyed-alien.net>
To: Mikolaj Rydzewski <miki at ma.krakow.pl>
Cc: FreeBSD-gnats-submit at freebsd.org
Subject: Re: bin/84298: [patch] allow mount(8) to recognize relative pathnames as mountpoints
Date: Fri, 29 Jul 2005 09:06:56 -0700
> >Description:
> Current version of mount(8) requires to specify absolute mountpoint
> pathname. Let's assume one has some mountpoints located in /mnt:
> /mnt/cdrom, /mnt/floppy, /mnt/usb
> It should be possible to call mount(8) like this:
> mount cdrom (assuming the current directory is /mnt). It has
> more practical impact when system is configured to allow non-root
> users to mount (cdroms, usb sticks) to mountpoints in their home
> directories. It's much more flexible to run mount ~/usb than
> mount /home/<username>/usb.
Not really an objection, but this last example is bogus. As the example
below shows, tcsh, bash, sh, and csh all make this work since ~expansion
happens before the command is run by the shell:
[7:22pm] brooks at pagefault (/usr/ports): echo ~brooks
/usr/home/brooks
[9:04am] brooks at pagefault (/usr/ports): bash
brooks at pagefault$ echo ~brooks
/usr/home/brooks
brooks at pagefault$ exit
[9:04am] brooks at pagefault (/usr/ports): sh
$ echo ~brooks
/usr/home/brooks
$ [9:04am] brooks at pagefault (/usr/ports): csh
[9:04am] brooks at pagefault (/usr/ports): echo ~brooks
/usr/home/brooks
[9:04am] brooks at pagefault (/usr/ports): exit
-- Brooks
More information about the freebsd-bugs
mailing list