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

Mikkel L. Ellertson mikkel at infinity-ltd.com
Tue Nov 20 14:48:44 UTC 2007


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.
> 
I don't know if there is a "proper" place to do  it, but I wounder
if you could put a script to do it in /etc/sysconfig/modules? You
would have to check exactly when they are run, but I suspect it
would be between the mounting of the root file system and the
mounting of network file systems.

Another way to do it would be to create an init script to do it. You
could then control when it is run, and it would not vanish because
of an update.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071120/da622ea5/attachment-0001.sig>


More information about the fedora-list mailing list