Lines 26-31
Link Here
|
26 |
nfsd=/usr/sbin/rpc.nfsd |
26 |
nfsd=/usr/sbin/rpc.nfsd |
27 |
mountd=/usr/sbin/rpc.mountd |
27 |
mountd=/usr/sbin/rpc.mountd |
28 |
|
28 |
|
|
|
29 |
# Exportfs exit status flag |
30 |
exportfs_status=/tmp/exportfs.status |
31 |
|
29 |
depend() { |
32 |
depend() { |
30 |
local myneed="net portmap" |
33 |
local myneed="net portmap" |
31 |
if [ -x /sbin/idmapd ] ; then |
34 |
if [ -x /sbin/idmapd ] ; then |
Lines 57-68
Link Here
|
57 |
eend $? "Error stopping NFS statd" |
60 |
eend $? "Error stopping NFS statd" |
58 |
} |
61 |
} |
59 |
|
62 |
|
60 |
waitfor_exportfs() { |
|
|
61 |
local pid=$1 |
62 |
( sleep ${EXPORTFSTIMEOUT:-30}; kill -9 $pid &>/dev/null ) & |
63 |
wait $1 |
64 |
} |
65 |
|
66 |
start() { |
63 |
start() { |
67 |
# This is the new "kernel 2.6 way" to handle the exports file |
64 |
# This is the new "kernel 2.6 way" to handle the exports file |
68 |
if grep -q nfsd /proc/filesystems &>/dev/null; then |
65 |
if grep -q nfsd /proc/filesystems &>/dev/null; then |
Lines 76-89
Link Here
|
76 |
|
73 |
|
77 |
start_statd |
74 |
start_statd |
78 |
|
75 |
|
79 |
# Exportfs likes to hang if networking isn't working. |
76 |
# Exportfs will perform DNS lookups on all hostnames and IPs in the |
80 |
# If that's the case, then try to kill it so the |
77 |
# exports file. |
81 |
# bootup process can continue. |
78 |
# Run it in the background, giving it two seconds to reject the exports |
|
|
79 |
# file. |
82 |
if grep -q '^/' /etc/exports &>/dev/null; then |
80 |
if grep -q '^/' /etc/exports &>/dev/null; then |
83 |
ebegin "Exporting NFS directories" |
81 |
ebegin "Exporting NFS directories" |
84 |
$exportfs -r 1>&2 & |
82 |
[ -f $exportfs_status ] && rm -f $exportfs_status |
85 |
waitfor_exportfs $! |
83 |
( exportfs -r 1>&2 ; echo "$?" >$exportfs_status ) & |
86 |
eend $? "Error exporting NFS directories" |
84 |
sleep 2s |
|
|
85 |
[ -f $exportfs_status ] && [ "$(cat $exportfs_status)" != '0' ] && eend $(cat $exportfs_status) "Error exporting NFS directories" |
87 |
fi |
86 |
fi |
88 |
|
87 |
|
89 |
if [ -x $rquotad ]; then |
88 |
if [ -x $rquotad ]; then |