Lines 8-27
Link Here
|
8 |
depend() { |
8 |
depend() { |
9 |
local myneed="" |
9 |
local myneed="" |
10 |
if [ -e /etc/fstab ] ; then |
10 |
if [ -e /etc/fstab ] ; then |
11 |
myneed="${myneed} $( |
11 |
fstabinfo -t nfs4 -q && myneed="$myneed rpc.idmapd" |
12 |
awk '!/^[[:space:]]*#/ && ($3 == "nfs" || $3 == "nfs4") { |
12 |
fstabinfo -t nfs -q && myneed="$myneed rpc.statd" |
13 |
if ($3 == "nfs4") |
13 |
fstabinfo -o -t nfs,nfs4 | while read opts; do |
14 |
idmapd = "rpc.idmapd" |
14 |
case $opts in |
15 |
if ($4 ~ /sec=(krb|spkm)/) |
15 |
*sec=krb*|*sec=spkm*) myneed="$myneed rpc.gssd" ;; |
16 |
gssd = "rpc.gssd" |
16 |
esac |
17 |
} |
17 |
done |
18 |
END { print idmapd " " gssd } |
|
|
19 |
' /etc/fstab |
20 |
)" |
21 |
fi |
18 |
fi |
|
|
19 |
before netmount |
22 |
config /etc/fstab |
20 |
config /etc/fstab |
23 |
need portmap rpc.statd ${myneed} |
21 |
need portmap ${myneed} |
24 |
use ypbind dns rpc.idmapd rpc.gssd |
22 |
provide nfsmount |
|
|
23 |
use ypbind dns |
25 |
} |
24 |
} |
26 |
|
25 |
|
27 |
start() { |
26 |
start() { |
Lines 35-48
start() {
Link Here
|
35 |
if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then |
34 |
if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then |
36 |
modprobe -q nfs |
35 |
modprobe -q nfs |
37 |
fi |
36 |
fi |
38 |
|
37 |
return 0 |
39 |
ebegin "Mounting NFS filesystems" |
|
|
40 |
mount -a -t nfs,nfs4 |
41 |
eend $? |
42 |
} |
43 |
|
44 |
stop() { |
45 |
ebegin "Unmounting NFS filesystems" |
46 |
umount -a -t nfs,nfs4 |
47 |
eend $? |
48 |
} |
38 |
} |