Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25799 - nfs-utils: /etc/init.d/nfs start takes 30 seconds to load.
Summary: nfs-utils: /etc/init.d/nfs start takes 30 seconds to load.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Stefan Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-02 20:54 UTC by sa
Modified: 2003-08-03 02:26 UTC (History)
2 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 sa 2003-08-02 20:54:38 UTC
/etc/init.d/nfs start takes 30 seconds to load. The 30 second wait timer is
enabled even if exportfs is succsesful.

This is what /etc/init.d/nfs does now:

# Exportfs likes to hang if networking isn't working.
# If that's the case, then try to kill it so the
# bootup process can continue.
    if grep -q '^/' /etc/exports &>/dev/null; then
        ebegin "Exporting NFS directories"
        $exportfs -r 1>&2 &
        ( sleep 30; kill -9 $! &>/dev/null & )
        wait
        eend $? "Error exporting NFS directories"
    fi

I would like to recommend doing something like this:

# Exportfs likes to hang if networking isn't working.
# So we will check for networking first.
if grep -q '^/' /etc/exports &>/dev/null; then
    ebegin "Exporting NFS directories"
    if ifconfig | grep -q eth &>/dev/null; then
        $exportfs -a 1>&2 &
        eend $? "Error exporting NFS directories"
    else
        eend 1 "Problem: Networking isn't up"
    fi
    eend $? "Error exporting NFS directories"
fi

What do you think?
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-08-03 02:26:40 UTC
please sync & reemerge

        if grep -q '^/' /etc/exports &>/dev/null; then
                ebegin "Exporting NFS directories"
                $exportfs -r 1>&2 &
                pid=$!
                ( sleep 30; kill -9 $pid &>/dev/null ) &
                wait $pid
                eend $? "Error exporting NFS directories"
        fi

already fixed in cvs