Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 7803 - netmount starts before portmap so nfs filesystems don't mount
Summary: netmount starts before portmap so nfs filesystems don't mount
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 7912 7992 8226 8261 8412 8559 8670 9913 10375 10488 10682 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-11 08:34 UTC by Chris Russell
Modified: 2002-11-26 04:51 UTC (History)
15 users (show)

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


Attachments
One line patch correcting typo causing portmap to start before netmount (netmount.patch,223 bytes, patch)
2002-10-21 21:59 UTC, Ovidiu D. Damian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Russell 2002-09-11 08:34:38 UTC
small gotcha, if you want to mount nfs filesystems at boot time the sensible
thing to do is `rc-update add portmap default` (and netmount if it's not already)
The trick is, with just portmap and netmount added, netmount runs before portmap
and remote FS's fail to mount, if you `rc-update add nfs default` as well, it
makes portmap start first and consequently netmount runs properly.

should we make netmount need portmap?

right now, I've just left nfs enabled but I'd like to turn it off again sometime.
Comment 1 Nils Ohlmeier 2002-09-11 10:03:25 UTC
The bug which causes the start og netmount before the portmapper lies in line 24
of /etc/init.d/netmount: 'need ${mydeps}'. But the dependecies for the netmount
service is calculated in the variabel myneed. So line 24 should look like this:
'need ${myneed}' if i'm not wrong.

BTW i'm talking about netmount 1.17 2002/08/25 20:29:07 from baselayout 1.8.3
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-09-11 13:07:10 UTC
Thanks, small type-o from last time i was on crack :-)
Anyhow, fixed on cvs.
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-09-15 06:10:29 UTC
*** Bug 7912 has been marked as a duplicate of this bug. ***
Comment 4 SpanKY gentoo-dev 2002-09-16 12:19:00 UTC
*** Bug 7992 has been marked as a duplicate of this bug. ***
Comment 5 SpanKY gentoo-dev 2002-09-22 15:11:12 UTC
*** Bug 8226 has been marked as a duplicate of this bug. ***
Comment 6 SpanKY gentoo-dev 2002-09-23 13:30:13 UTC
*** Bug 8261 has been marked as a duplicate of this bug. ***
Comment 7 SpanKY gentoo-dev 2002-09-23 13:34:39 UTC
could you double check this ?

i ran `ebuild baselayout-1.8.3.ebuild install` right after `cvs update` and the 
resulting ${D}/etc/init.d/netmount file still has this bug ...
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2002-09-23 14:19:58 UTC
Fixed on CVS.  I was still waiting for the damn raid thing to get resolved.
Comment 9 SpanKY gentoo-dev 2002-09-26 10:18:30 UTC
*** Bug 8412 has been marked as a duplicate of this bug. ***
Comment 10 SpanKY gentoo-dev 2002-09-30 12:15:55 UTC
*** Bug 8559 has been marked as a duplicate of this bug. ***
Comment 11 SpanKY gentoo-dev 2002-10-12 16:25:14 UTC
*** Bug 8670 has been marked as a duplicate of this bug. ***
Comment 12 alex f 2002-10-15 10:06:55 UTC
bug is still present. i just ran into it.
Comment 13 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-15 13:50:08 UTC
Attach your copy of netmount.
Comment 14 Ovidiu D. Damian 2002-10-21 21:59:41 UTC
Created attachment 4887 [details, diff]
One line patch correcting typo causing portmap to start before netmount

I just built this box and the bug still seems to be in the netmount script as
of 10/19/2002. Here's a one line patch that fixes it.
Comment 15 SpanKY gentoo-dev 2002-10-22 10:01:45 UTC
its been fixed in all my systems with 1.8.4 ... 
 
root@vapier eggdrop # cat /etc/gentoo-release 
Gentoo Base System version 1.4.1 
root@vapier eggdrop # emerge -s baselayout 
Searching... 
[ Results for search key : baselayout ] 
[ Applications found : 1 ] 
 
*  sys-apps/baselayout 
      Latest version available: 1.8.4 
      Latest version installed: 1.8.4 
      Homepage: http://www.gentoo.org/ 
      Description: Base layout for Gentoo Linux filesystem (incl. initscripts  
and sysvinit) 
 
root@vapier eggdrop # ebuild 
/usr/portage/sys-apps/baselayout/baselayout-1.8.4.ebuild install 
>>> md5 ;-) sysvinit-2.84.tar.gz 
>>> Unpacking source... 
>>> Unpacking sysvinit-2.84.tar.gz 
>>> Unpacking rc-scripts-1.4.1.tar.bz2 
>>> Source unpacked. 
[ lots of stuff ] 
>>> Completed installing into /var/tmp/portage/baselayout-1.8.4/image/ 
 
root@vapier eggdrop # grep need 
/var/tmp/portage/baselayout-1.8.4/image/etc/init.d/netmount  
        local myneed="net" 
                local myneed="${myneed} portmap" 
        need ${myneed} 
root@vapier eggdrop #  
Comment 16 Nils Ohlmeier 2002-10-23 09:57:16 UTC
The problem is: i don't know where do you get the 1.8.4 from.
I just made an 'emerge rsync' on my 1.2 box and it looks like this:

cloudcity root # emerge -s baselayout
Searching...
[ Results for search key : baselayout ]
[ Applications found : 1 ]

*  sys-apps/baselayout
      Latest version available: 1.8.3
      Latest version installed: 1.8.3
      Homepage: http://www.gentoo.org/
      Description: Base layout for Gentoo Linux filesystem (incl. initscripts
and sysvinit)

I think this is the reason why we still get duplicates of this bug.
Comment 17 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-25 16:53:05 UTC
azarah@nosferatu profiles $ cvs update
U package.mask
azarah@nosferatu profiles $ grep baselayout package.mask 
# it in baselayout, but we need >=gawk-3.1.0-r3
#we no longer use sysvinit (rolled into baselayout)
azarah@nosferatu profiles $ emerge -s baselayout
Searching...   
[ Results for search key : baselayout ]
[ Applications found : 1 ]
 
*  sys-apps/baselayout
      Latest version available: 1.8.4
      Latest version installed: 1.8.4
      Homepage: http://www.gentoo.org/
      Description: Base layout for Gentoo Linux filesystem (incl. initscripts
and sysvinit)
 
azarah@nosferatu profiles $ 


I suggest you change your rsync server, or cleanout /usr/portage, and do
a emerge rsync again.  This bug is fixed.  If you have rsync problems, please
open another bug for that.
Comment 18 Nils Ohlmeier 2002-10-25 17:25:03 UTC
For myself this bug is fixed since my first comment, but i'm wondering why i
still get mails for this bug... and after some searching hear is the reason:

the baselayout-1.8.4.ebuild is marked for unstable
KEYWORDS="~x86 ~ppc ~sparc ~sparc64 ~alpha"

so maybe moving this ebuild to stable will finaly close this bug.
Comment 19 SpanKY gentoo-dev 2002-10-29 15:21:52 UTC
*** Bug 9913 has been marked as a duplicate of this bug. ***
Comment 20 Bart Theunissen 2002-10-29 15:51:37 UTC
I still have the error...

--- BEGIN SHELL ---

jupiter init.d # emerge -s baselayout
Searching...   
[ Results for search key : baselayout ]
[ Applications found : 1 ]
 
*  sys-apps/baselayout
      Latest version available: 1.8.4.1
      Latest version installed: 1.8.4.1
      Homepage: http://www.gentoo.org/
      Description: Base layout for Gentoo Linux filesystem (incl. initscripts
and sysvinit)
 
jupiter init.d # rep need /etc/init.d/netmount 
        local myneed="net"
                local myneed="${myneed} portmap"
        need ${mydeps}
jupiter init.d # grep Header netmount 
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/netmount,v 1.17 2002/08/25
20:29:07 azarah Exp $
jupiter init.d # 

--- END SHELL ---
Comment 21 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-29 16:11:13 UTC
nosferatu init.d # grep Header netmount
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/netmount,v 1.19 2002/10/13
19:20:23 azarah Exp $
nosferatu init.d # 



--

You do not know how to update config files.

 # emerge --help config

Comment 22 Bart Theunissen 2002-10-30 01:19:31 UTC
I do know how to update config files.

jupiter init.d # find /etc -name ._'*'
jupiter init.d # 

Okay ... I believe it is fixed, but not on my system. I emerged baselayout
again, but the netmount was still version 1.17. It did say the following: 


 sys-apps/baselayout
    selected: none
   protected: 1.7.8-r1 1.8.4.1
     omitted: none

So I thought lets delete the /etc/init.d/netmount and re-emerge baselayout. That
worked now the netmount is version 1.19. But this can't be the thing to do, or
is it ? Who is holding on to version 1.7.8-r1 ?
Comment 23 SpanKY gentoo-dev 2002-11-07 09:23:46 UTC
*** Bug 10375 has been marked as a duplicate of this bug. ***
Comment 24 Brad Cowan (RETIRED) gentoo-dev 2002-11-09 14:36:52 UTC
*** Bug 10488 has been marked as a duplicate of this bug. ***
Comment 25 SpanKY gentoo-dev 2002-11-13 15:30:11 UTC
*** Bug 10682 has been marked as a duplicate of this bug. ***
Comment 26 Chris Russell (RETIRED) gentoo-dev 2002-11-25 06:21:22 UTC
this has started happening again for me - not quite sure why..

first, I've checked the awk part of the script detects my nfs mount correctly
which should theoretically enable portmap as a dependancy

root # awk '!/^#/ && $3 == "nfs" && $4 !~ /noauto/ { print $0 }' /etc/fstab
tremor:/usr/portage/distfiles   /usr/portage/distfiles  nfs     noatime         0 0

so that definately finds something..

next, # Only try to mount NFS filesystems if portmap was started.
well, portmap didn't start therefore the nfs mount doesn't happen - I'm guessing
this is a problem in the depend section but it's not staring me in the face at
1am :) tell me if I've done something dumb, (and yes, portmap is definately
added in runlevel default not that it should matter if I'm reading this correctly).

depend() {

        local myneed="net"
        local myuse=""
        
        #
        # Only have Portmap as a dependency if there is a nfs mount in fstab
        # that should be mounted at boot time.  Also filter out comments.
        #
        local nfsmounts="$(awk '!/^#/ && $3 == "nfs" && $4 !~ /noauto/ { print
$0 }' /etc/fstab)"
        
        if [ -n "${nfsmounts}" ]
        then
                local myneed="${myneed} portmap"
                local myuse="${myuse} nfs"
        fi

        need ${myneed}
        use ${myuse}
}
Comment 27 Martin Schlemmer (RETIRED) gentoo-dev 2002-11-25 14:08:33 UTC
Err, I know why.  Its prob because im an idiot :/  Check netmount's cache from
/mnt/.init.d/depcache:

----
#*** /etc/init.d/netmount ***

myservice="/etc/init.d/netmount"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

depend() {
 return 0
}

depend() {

        local myneed="net"
        local myuse=""
        
        
        if [ -n "${nfsmounts}" ]
        then
                local myneed="${myneed} portmap"
                local myuse="${myuse} nfs"
        fi

        need ${myneed}
        use ${myuse}
}

depend
-----

It ... err ... filter out the awk command :/
Comment 28 Martin Schlemmer (RETIRED) gentoo-dev 2002-11-25 14:14:09 UTC
Ok, its a one char fix .. change in /lib/rcscripts/awk/cachedepends.awk:

----
            # Filter out comments and only process if its a rcscript
            if (($0 !~ /[[:space:]]*#/) && (ISRCSCRIPT == 1 )) {
----

To:

---
            # Filter out comments and only process if its a rcscript
            if (($0 !~ /^[[:space:]]*#/) && (ISRCSCRIPT == 1 )) {
---

Note the '^' in front of '[[:space:]]' ....
Comment 29 Chris Russell (RETIRED) gentoo-dev 2002-11-26 04:51:49 UTC
yep, that did it, thanks!

(also removed duplicate cc (I was the original reporter, just with a different
address at the time.))