From c45313dfa9880c4aedb72da1b2ac3159eee05a93 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Tue, 8 Dec 2015 17:02:31 -0500 Subject: [PATCH] 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 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 }