Re: relative path in fstab
On Sunday 20 February 2005 12:47 pm, Roberto C. Sanchez wrote:
> Daniel D Jones wrote:
> > Is it possible to put a path relative to the users home directory in
> > fstab?
> > fstab doesn't seem to expand either ~ or $HOME.
> > Man and google have been no help.
> That would not make sense in the context of an fstab. $HOME belongs to
> a particular user. mount is always run as root:
> -rwsr-xr-x 1 root root 76K Sep 24 00:34 /bin/mount
> Thus, $HOME would always expand to /root. Why not just specify the
> absolute path?
I have a number of network paths I want to mount. I don't want to pollute the
root directory with a bunch of extra paths. I could add the directories
under /mnt or a custom root directory, such as /shares or /network but I
don't like that for a few reasons. Some of our users are less than clueful.
I'd prefer to avoid them having to type or click through a long path. And
for many programs, when you go to open or save a file, the default location
in the file picker dialog is your home directory. So I wanted to mount them
in the users home directory by adding them to fstab with the noauto option
and mounting from the users login script.
The workaround I've come up with is to mount them under /mnt and to create
links to the mountpoints in the users home directory.