conf/105465: rc.d/nfslocking is dependent on rpcbind

Ruslan Ermilov ru at FreeBSD.org
Mon Nov 13 11:20:58 UTC 2006


The following reply was made to PR conf/105465; it has been noted by GNATS.

From: Ruslan Ermilov <ru at FreeBSD.org>
To: Daniel Gerzo <danger at FreeBSD.org>
Cc: bug-followup at FreeBSD.org
Subject: Re: conf/105465: rc.d/nfslocking is dependent on rpcbind
Date: Mon, 13 Nov 2006 14:17:59 +0300

 On Mon, Nov 13, 2006 at 10:31:20AM +0100, Daniel Gerzo wrote:
 > Modification of rc.d/nfslocking will be needed as well as update of NFS
 > Handbook chapter (I can take care of the latter one).
 > 
 I'm not sure what updates are needed for the Handbook (probably none),
 but the changes to the script should be like this:
 
 %%%
 Index: nfslocking
 ===================================================================
 RCS file: /home/ncvs/src/etc/rc.d/nfslocking,v
 retrieving revision 1.11
 diff -u -p -r1.11 nfslocking
 --- nfslocking	7 Oct 2004 13:55:26 -0000	1.11
 +++ nfslocking	13 Nov 2006 11:07:37 -0000
 @@ -5,7 +5,7 @@
  #
  
  # PROVIDE: nfslocking
 -# REQUIRE: nfsserver nfsclient nfsd
 +# REQUIRE: nfsserver nfsclient nfsd rpcbind
  # BEFORE:  DAEMON
  # KEYWORD: nojail
  
 @@ -14,13 +14,28 @@
  # Save the (one) commandline argument in case it gets clobbered.
  arg=$1
  
 +start_precmd="nfslocking_precmd"
 +
  # Either NFS client or server must be enabled or this must be a 'forcestart'
  # for either of the daemons to start.
  #
 -start_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable ||
 +nfslocking_precmd()
 +{
 +	if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable && \
 +	    [ -z "$rc_force" ]
 +	then
 +		return 1
 +	fi
 +	if ! checkyesno rpcbind_enable && \
 +	    ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
 +	then
 +		force_depend rpcbind || return 1
 +	fi
 +}
 +
 +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable ||
      [ -n "$rc_force" ]'
 -stop_precmd=$start_precmd
 -status_precmd=$start_precmd
 +status_precmd=$stop_precmd
  
  # rpc.statd
  #
 %%%
 
 
 Cheers,
 -- 
 Ruslan Ermilov
 ru at FreeBSD.org
 FreeBSD committer


More information about the freebsd-bugs mailing list