Lines 7-22
Link Here
|
7 |
local myneed="net" |
7 |
local myneed="net" |
8 |
local myuse="" |
8 |
local myuse="" |
9 |
|
9 |
|
10 |
# |
|
|
11 |
# Only have Portmap as a dependency if there is a nfs mount in fstab |
10 |
# Only have Portmap as a dependency if there is a nfs mount in fstab |
12 |
# that should be mounted at boot time. Also filter out comments. |
11 |
# that should be mounted at boot time. Also filter out comments. |
13 |
# |
|
|
14 |
local nfsmounts="$(awk '!/^#/ && $3 == "nfs" && $4 !~ /noauto/ { print $0 }' /etc/fstab)" |
12 |
local nfsmounts="$(awk '!/^#/ && $3 == "nfs" && $4 !~ /noauto/ { print $0 }' /etc/fstab)" |
15 |
|
13 |
local nfs4mounts="$(awk '!/^#/ && $3 == "nfs4" && $4 !~ /noauto/ { print $0 }' /etc/fstab)" |
16 |
if [ -n "${nfsmounts}" ] |
14 |
|
|
|
15 |
if [ -n "${nfsmounts}${nfs4mounts}" ] |
16 |
then |
17 |
myneed="${myneed} portmap" |
18 |
myuse="${myuse} nfs" |
19 |
fi |
20 |
if [ -n "${nfs4mounts}" ] && [ -x /sbin/idmapd ] |
17 |
then |
21 |
then |
18 |
local myneed="${myneed} portmap" |
22 |
myneed="${myneed} idmapd" |
19 |
local myuse="${myuse} nfs" |
|
|
20 |
fi |
23 |
fi |
21 |
|
24 |
|
22 |
need ${myneed} |
25 |
need ${myneed} |