Date: Mon, 13 Nov 2006 11:20:11 GMT From: Ruslan Ermilov <ru@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: conf/105465: rc.d/nfslocking is dependent on rpcbind Message-ID: <200611131120.kADBKBqo095280@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/105465; it has been noted by GNATS. From: Ruslan Ermilov <ru@FreeBSD.org> To: Daniel Gerzo <danger@FreeBSD.org> Cc: bug-followup@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@FreeBSD.org FreeBSD committer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611131120.kADBKBqo095280>