summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/nfsclient
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-12-31 10:37:18 +0000
committeryar <yar@FreeBSD.org>2006-12-31 10:37:18 +0000
commitdc9f8423c3772111565181a8568c60c4da0a1689 (patch)
tree7ed36d4fe8965c59b37bcccfa387cf77469cbeef /etc/rc.d/nfsclient
parent58a4c67f05bc56e76c61ca19ed42f2e412cfd55f (diff)
downloadFreeBSD-src-dc9f8423c3772111565181a8568c60c4da0a1689.zip
FreeBSD-src-dc9f8423c3772111565181a8568c60c4da0a1689.tar.gz
Use $required_modules wherever suitable. Use load_kld() in special
cases. So we get rid of quite a few lines of duplicated code.
Diffstat (limited to 'etc/rc.d/nfsclient')
-rw-r--r--etc/rc.d/nfsclient14
1 files changed, 1 insertions, 13 deletions
diff --git a/etc/rc.d/nfsclient b/etc/rc.d/nfsclient
index b6d4bf1..4888685 100644
--- a/etc/rc.d/nfsclient
+++ b/etc/rc.d/nfsclient
@@ -12,20 +12,8 @@
name="nfsclient"
rcvar="nfs_client_enable"
start_cmd="nfsclient_start"
-start_precmd="nfsclient_precmd"
stop_cmd="unmount_all"
-
-# Load nfs module if it was not compiled into the kernel
-nfsclient_precmd()
-{
- if ! sysctl vfs.nfs >/dev/null 2>&1; then
- if ! kldload nfsclient; then
- warn 'Could not load nfs client module'
- return 1
- fi
- fi
- return 0
-}
+required_modules="nfsclient:nfs"
nfsclient_start()
{
OpenPOWER on IntegriCloud