summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/ypxfrd
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2012-02-14 10:51:24 +0000
committerdougb <dougb@FreeBSD.org>2012-02-14 10:51:24 +0000
commit5abebddb436aac4d1f396c82a98743aa0a774aa6 (patch)
tree25bb26903a57056ed6ba1543fab1af2635184b77 /etc/rc.d/ypxfrd
parenta6e5cd41ae1c223f22bef504edae255aea74c2e1 (diff)
downloadFreeBSD-src-5abebddb436aac4d1f396c82a98743aa0a774aa6.zip
FreeBSD-src-5abebddb436aac4d1f396c82a98743aa0a774aa6.tar.gz
Fix various issues with the NFS and RPC related scripts:
1. Add new functionality to the force_depend method to incorporate the tests for whether the service is enabled and/or already running. 2. Add a new option to bypass checking only that the service is enabled at boot time, and always check if it is running. 3. Use this new functionality to greatly simplify the rc.d scripts that use force_depend. 4. Add a force_depend for statd in lockd 5. Remove the check that either nfs_server or nfs_client is _enable'd from statd and lockd. This was always overkill, and prevented using the {one|force}start options, as well as stop'ing on the command line. 6. The yp* scripts had some of their arguments in various weird orders. Bring them into line with the model. 7. If mountd fails to create /var/db/mountdtab, err out. Ideas, suggestions, and/or review from delphij and jilles. Pointy hats are completely my responsibility however.
Diffstat (limited to 'etc/rc.d/ypxfrd')
-rwxr-xr-xetc/rc.d/ypxfrd19
1 files changed, 7 insertions, 12 deletions
diff --git a/etc/rc.d/ypxfrd b/etc/rc.d/ypxfrd
index f125a30..63924e4 100755
--- a/etc/rc.d/ypxfrd
+++ b/etc/rc.d/ypxfrd
@@ -11,25 +11,20 @@
name="ypxfrd"
rcvar="nis_ypxfrd_enable"
-command="/usr/sbin/rpc.${name}"
-start_precmd="ypxfrd_precmd"
+
load_rc_config $name
+
+command="/usr/sbin/rpc.${name}"
command_args="${nis_ypxfrd_flags}"
+start_precmd="ypxfrd_precmd"
+
ypxfrd_precmd()
{
local _domain
- if ! checkyesno rpcbind_enable && \
- ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
- then
- force_depend rpcbind || return 1
- fi
- if ! checkyesno nis_server_enable && \
- ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
- then
- force_depend ypserv || return 1
- fi
+ force_depend rpcbind || return 1
+ force_depend ypserv nis_server || return 1
_domain=`domainname`
if [ -z "$_domain" ]; then
OpenPOWER on IntegriCloud