FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 11-19-2007, 06:59 PM
Michael Eager
 
Default Execute a command before mounting what's in /etc/fstab - how?

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.

--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-19-2007, 09:59 PM
John Summerfield
 
Default Execute a command before mounting what's in /etc/fstab - how?

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?


sysctl (/etc/sysctl.conf) might do this.


--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- 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@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-19-2007, 10:32 PM
Rick Stevens
 
Default Execute a command before mounting what's in /etc/fstab - how?

On Tue, 2007-11-20 at 07:59 +0900, John Summerfield 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?
> >
> sysctl (/etc/sysctl.conf) might do this.

No, that only futzes with stuff under /proc/sys, not /proc/fs.

The other filesystems are mounted by line 95 in /etc/rc.d/init.d/netfs.
So, stuff that line just before it:

echo 0 >/proc/fs/cifs/LinuxExtensionsEnabled
action $"Mounting other filesystems: " mount -a -t
nonfs,nfs4,smbfs,cifs,ncpfs,gfs

----------------------------------------------------------------------
- Rick Stevens, Principal Engineer rstevens@internap.com -
- CDN Systems, Internap, Inc. http://www.internap.com -
- -
- Polygon: A dead parrot (With apologies to John Cleese) -
----------------------------------------------------------------------

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-20-2007, 08:51 AM
Chris G
 
Default Execute a command before mounting what's in /etc/fstab - how?

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.

--
Chris Green

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-20-2007, 01:48 PM
"Mikkel L. Ellertson"
 
Default Execute a command before mounting what's in /etc/fstab - how?

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!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-20-2007, 01:52 PM
"Robert P. J. Day"
 
Default Execute a command before mounting what's in /etc/fstab - how?

On Tue, 20 Nov 2007, Mikkel L. Ellertson wrote:

> 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?

IMHO, if you need something to run before a filesystem can be mounted,
then that mount doesn't belong in /etc/fstab. /etc/fstab should
philosophically refer to only those filesystems that can be mounted
normally during the boot procedure without any funny hackery.

if you need something out of the ordinary done first, put it in a
later startup script somewhere, as others have suggested.

rday
--

================================================== ======================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
================================================== ======================

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-20-2007, 01:53 PM
Aaron Konstam
 
Default Execute a command before mounting what's in /etc/fstab - how?

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.
--
================================================== =====================
Innocence ends when one is stripped of the delusion that one likes
oneself. -- Joan Didion, "On Self Respect"
================================================== =====================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@sbcglobal.net

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-20-2007, 02:13 PM
Chris G
 
Default Execute a command before mounting what's in /etc/fstab - how?

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

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-20-2007, 08:03 PM
John Summerfield
 
Default Execute a command before mounting what's in /etc/fstab - how?

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@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- 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@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 09:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org