Summary: | [patch] allow mount(8) to recognize relative pathnames as mountpoints | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Mikolaj Rydzewski <miki> | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Open --- | ||||||
Severity: | Affects Only Me | Keywords: | patch | ||||
Priority: | Normal | ||||||
Version: | 5.4-RELEASE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Mikolaj Rydzewski
2005-07-29 13:50:19 UTC
> >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
On Fri, 29 Jul 2005, Brooks Davis wrote: >> 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: Yes, you're right, thanks for pointing this. But the problem with mount ignoring relative mountpoint pathnames still exists. Regards -- Mikolaj Rydzewski <miki@ma.krakow.pl> PGP KeyID: 8b12ab02 For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi> |