Re: Execute a command before mounting what's in /etc/fstab - how?

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

 



On Tue, Nov 20, 2007 at 08:53:14AM -0600, Aaron Konstam wrote:
> On Tue, 2007-11-20 at 09:51 +0000, Chris G wrote:
> > On Mon, Nov 19, 2007 at 11:59:26AM -0800, Michael Eager wrote:
> > > Chris G wrote:
> > >> I have a Freecom network disk which needs the following to be executed
> > >> before I can mount it using an entry in /etc/fstab :-     echo 0 > 
> > >> /proc/fs/cifs/LinuxExtensionsEnabled
> > >> Is there any neat way I can get this command executed during the boot
> > >> sequence before the entries in /etc/fstab are mounted?
> > >
> > > Drives are mounted in rc.sysinit.  You can add your
> > > line before this happens.
> > >
> > ... but it'll get lost on next install, surely there's a "proper"
> > place to do it.
> Someone suggested putting the execution in the correct place
> in /etc/rc.sysinit, which seemed right to me.

I've actually ended up putting it in /etc/rc.d/rc.local, I have
there:-

    modprobe cifs
    echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
    mount /freecom

... and in /etc/fstab I have:-

    //freecom/chris         /freecom                cifs noauto,user,password="" 0 0

I could put the whole mount command in /etc/rc.d/rc.local but I prefer
having something explicit in /etc/fstab.

I would *hope* that /etc/rc.d/rc.local doesn't get overwritten by an
upgrade or at least that it's copied before being overwritten.

-- 
Chris Green


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

  Powered by Linux