Date: Fri, 29 Jul 2005 16:10:26 GMT From: Brooks Davis <brooks@one-eyed-alien.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/84298: [patch] allow mount(8) to recognize relative pathnames as mountpoints Message-ID: <200507291610.j6TGAQ9Y025847@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/84298; it has been noted by GNATS. From: Brooks Davis <brooks@one-eyed-alien.net> To: Mikolaj Rydzewski <miki@ma.krakow.pl> Cc: FreeBSD-gnats-submit@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@pagefault (/usr/ports): echo ~brooks /usr/home/brooks [9:04am] brooks@pagefault (/usr/ports): bash brooks@pagefault$ echo ~brooks /usr/home/brooks brooks@pagefault$ exit [9:04am] brooks@pagefault (/usr/ports): sh $ echo ~brooks /usr/home/brooks $ [9:04am] brooks@pagefault (/usr/ports): csh [9:04am] brooks@pagefault (/usr/ports): echo ~brooks /usr/home/brooks [9:04am] brooks@pagefault (/usr/ports): exit -- Brooks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507291610.j6TGAQ9Y025847>