Re: Where is the best place for "mount" commands?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





WipeOut wrote:

WipeOut wrote:

David G. Miller wrote:

WipeOut <wipe_out@xxxxxxxxxxxxxxxxxxxxx> wrote:

I have a number mounts I need for network shares on my samba server.. I would like the mount commands to run when I login..

Where is the best place for a "login script" type thing in a Linux system?

I have read mention of using rc.local, .bashrc and .profile files but haven't found anything conclusive as to what the "right" way to do it is..

Any advice would be appreciated..

/etc/fstab for either things you want mounted automatically at boot (use the "auto" option) or things you want to easily mount from the command line (fully define the mount but use the "noauto" option). Also, this is a system resource so every user sees the same definitions.

rc.local is a good place to put actual mount commands for things you want mounted automatically at boot but don't want a problem with the mount to hold up your boot process. My server uses RAID 1 for all mount points critical for operation and these are automatically mounted through fstab but I have a large non-RAID scratch area that I define noauto in fstab and then mount with a mount command in rc.local. Like /etc/fstab, this is a system resource so it acts the same for everybody.

.profile (or .login for csh folks) is the place for stuff that is user mountable and you want to have mounted when the user logs in. .bashrc is sourced for each new shell but .profile is only sourced at the initial login and you probably don't want to mount these each time the user opens a new command shell. .profile is specific to each user so you can customize which share(s) get mounted for a particular user.

Cheers,
Dave

Thanks Dave.. I think what I am looking for then is probably .profile to make it user specific but not run every time a shell is opened..


Ok after some playing I found that .profile doesn't seem to work..

I then tried automount but that proved to be irritating because I couldn't get it working either..

So I used the only faithful.. /etc/fstab..

Now the question is..

When I used the "Places" menu to access network shares it created nice shortcuts to that location on the desktop and in the "file browser" windows in applications.. These same shortcuts were available in FC3 when mounting a share using /etc/fstab.. With FC5 when mounting with /etc/fstab these shortcuts don't appear..

How can I get them to show up?

Thanks

Yes.  That's a gripe of mine.  The "desktop" folks seem to have taken over
and everything works great (only) from the desktop.  For us command line
"junkies" (particularly those of us who have a need to switch back and
forth between command line and Gnome) things no longer integrate as well
as they once did (in my opinion).

When I last complained about this, I was referred to a mysterious
"gnome-mount" command.  However, I have not explored this further due
to the press of some other work at the moment.

If you get there before me, I look forward to reading about your solution
on the list.

Good luck.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux