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

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

 



Chris G wrote:
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.

It won't get clobbered, but IMV this isn't the right way.
man modprobe.conf

You can run arbitrary commands to install a module, so you could have both the echo and the modprobe there, and then auto should work in /etc/fstab






--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxx
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

Please do not reply off-list

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux