Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 4248 - autofs init should have "after portmap"
Summary: autofs init should have "after portmap"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Brad Cowan (RETIRED)
URL:
Whiteboard:
Keywords:
: 4782 7036 (view as bug list)
Depends on:
Blocks: 8254
  Show dependency tree
 
Reported: 2002-06-27 13:06 UTC by Sandy McArthur
Modified: 2003-02-04 19:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sandy McArthur 2002-06-27 13:06:22 UTC
"after portmap" should be added to depend() in /etc/init.d/autofs.

The, somewhat obscure, problem is that remote mounts via nfs need portmap
running. autofs doesn't need portmap but I think it's common to use it to mount
network file systems. There could be a race condition if autofs is loaded, then
a service that uses a nfs automounted filesystem will get stuck until portmap is
started which could hang the whole init process.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-28 15:22:46 UTC
I think it should rather be "use portmap".
Comment 2 Sandy McArthur 2002-06-28 16:16:55 UTC
I don't have a problem with this as I use autofs for nfs stuff. But people that
use autofs to mount floppies or cdroms don't need portmap running.

I could argue:
If you are setting up nfs it's your job to know what needs to be running and
start the right services at boot time.

or:
Most people will be grateful for not having to think about portmap when setting
up autofs to mount stuff via nfs.

I think either is valid but the first seems "more" valid.
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-29 00:46:53 UTC
Recheck what "use portmap" does.  It means it "need" portmap, but will only
start it before the script that have the line if portmap is added to the
boot, or current runleve.
Comment 4 Sandy McArthur 2002-06-29 02:35:05 UTC
I'll admit I didn't have a proper understanding of "use". After putting much
more thought into this than I originally intened to here is an one liner that
can be added to depend that checks the autofs config files for the use of nfs
and if found makes autofs depend on portmap:

grep fstype=nfs `sed -e '/^#/d' -e '/^$/d' /etc/autofs/auto.master | cut -f 2`
&>/dev/null && need portmap
Comment 5 Sandy McArthur 2002-07-01 03:45:15 UTC
Opps, the suggested line to detect if nfs is used uses `cut` which is installed
to /usr/bin/cut and /usr may not be mounted at boot time. The following line is
close but needs some help to be more general in it's detection of the 2nd field,
the following line assumes one tab between the mount point and cfg file:

grep fstype=nfs `sed -e '/^#/d' -e '/^$/d' -e 's/^.*\t\(.*\)$/\1/'
/etc/autofs/auto.master` &>/dev/null && need portmap
Comment 6 SpanKY gentoo-dev 2002-08-02 21:42:36 UTC
*** Bug 4782 has been marked as a duplicate of this bug. ***
Comment 7 Juri Haberland 2002-08-09 08:28:20 UTC
Actually there is another "bug" un the autofs init-script:
 in depend() are two lines with "need" where only the last is used:
need ypbind
need net

This should be:
need net ypbind


Comment 8 SpanKY gentoo-dev 2002-08-26 13:40:32 UTC
*** Bug 7036 has been marked as a duplicate of this bug. ***
Comment 9 Brad Cowan (RETIRED) gentoo-dev 2002-10-27 00:35:27 UTC
I know these bugs are rather old, but I've been assigned to try and solve some
of them. I just committed an -r4 of autofs which changes a few things and
hopefully helps out. Mainly added a use portmap, and there should be a
functional stats option that should funtion like the  usual status, as status is
already predefined to show if the daemon is running or not.*NOTE that is stats
not status. Hopefully some library compile issues are also fixed.  Any help with
autofs would be appreciated because I myself have only used it to check on these
bugs and see how it functions, maily because I have no real use for it. Please
contact me with any improved scripts or changes you have made.
Thanks