diff options
author | mtm <mtm@FreeBSD.org> | 2007-03-30 19:08:58 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2007-03-30 19:08:58 +0000 |
commit | 87009ffe7dd781d2c670eb88e0f259436944574f (patch) | |
tree | c074e2a3c56df1256935b9ec893971b972e17240 /etc | |
parent | 52958886541e8c2847d9e6d29505d9e0a1a68898 (diff) | |
download | FreeBSD-src-87009ffe7dd781d2c670eb88e0f259436944574f.zip FreeBSD-src-87009ffe7dd781d2c670eb88e0f259436944574f.tar.gz |
Record rc.d/nfslocking dependency on rc.d/rpcbind.
PR: conf/105465
Submitted By: ru (with minor cosmetic change)
MFC-After: 1 month
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/lockd | 22 | ||||
-rwxr-xr-x | etc/rc.d/nfslocking | 22 | ||||
-rw-r--r-- | etc/rc.d/statd | 22 |
3 files changed, 54 insertions, 12 deletions
diff --git a/etc/rc.d/lockd b/etc/rc.d/lockd index f8a77e8..5853a48 100644 --- a/etc/rc.d/lockd +++ b/etc/rc.d/lockd @@ -5,7 +5,7 @@ # # PROVIDE: nfslocking -# REQUIRE: nfsserver nfsclient nfsd +# REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail @@ -17,10 +17,24 @@ arg=$1 # 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 +} + +start_precmd="nfslocking_precmd" +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 # diff --git a/etc/rc.d/nfslocking b/etc/rc.d/nfslocking index f8a77e8..5853a48 100755 --- a/etc/rc.d/nfslocking +++ b/etc/rc.d/nfslocking @@ -5,7 +5,7 @@ # # PROVIDE: nfslocking -# REQUIRE: nfsserver nfsclient nfsd +# REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail @@ -17,10 +17,24 @@ arg=$1 # 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 +} + +start_precmd="nfslocking_precmd" +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 # diff --git a/etc/rc.d/statd b/etc/rc.d/statd index f8a77e8..5853a48 100644 --- a/etc/rc.d/statd +++ b/etc/rc.d/statd @@ -5,7 +5,7 @@ # # PROVIDE: nfslocking -# REQUIRE: nfsserver nfsclient nfsd +# REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail @@ -17,10 +17,24 @@ arg=$1 # 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 +} + +start_precmd="nfslocking_precmd" +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 # |