aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2015-12-08 17:02:31 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-12-11 13:56:03 -0600
commitc45313dfa9880c4aedb72da1b2ac3159eee05a93 (patch)
treedf06b0ffae4a3c672798d5c5417a3a452f0b545e /init.d
parent3ef2bbfb19fe3ca0c169f9dcf48b70a59321a5d1 (diff)
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.
Diffstat (limited to 'init.d')
-rw-r--r--init.d/netmount.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/init.d/netmount.in b/init.d/netmount.in
index d1f3cffc..ac909e0a 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
}