1 |
commit: c45313dfa9880c4aedb72da1b2ac3159eee05a93 |
2 |
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 8 22:02:31 2015 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 11 19:56:03 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=c45313df |
7 |
|
8 |
netmount: use want dependency to start nfsclient |
9 |
|
10 |
add in parsing of fstab to determine if nfsclient should be automatically |
11 |
started so that netmount can mount nfs without adding nfsclient |
12 |
to the default runlevel |
13 |
|
14 |
This fixes #71. |
15 |
|
16 |
init.d/netmount.in | 12 ++++++++++-- |
17 |
1 file changed, 10 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/init.d/netmount.in b/init.d/netmount.in |
20 |
index d1f3cff..ac909e0 100644 |
21 |
--- a/init.d/netmount.in |
22 |
+++ b/init.d/netmount.in |
23 |
@@ -6,8 +6,16 @@ description="Mounts network shares according to /etc/fstab." |
24 |
|
25 |
depend() |
26 |
{ |
27 |
- config /etc/fstab |
28 |
- use afc-client amd nfsclient autofs openvpn |
29 |
+ local opts mywant="" |
30 |
+ for opts in $(fstabinfo -o -t nfs,nfs4); do |
31 |
+ case $opts in |
32 |
+ noauto) ;; |
33 |
+ *) mywant="$mywant nfsclient"; break ;; |
34 |
+ esac |
35 |
+ done |
36 |
+ config /etc/fstab |
37 |
+ want $mywant |
38 |
+ use afc-client amd openvpn |
39 |
use dns |
40 |
keyword -jail -prefix -systemd-nspawn -vserver -lxc |
41 |
} |