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