[Midnightbsd-cvs] src: etc/rc.d: Rename nfslocking -> lockd

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Jan 17 12:35:27 EST 2009


Log Message:
-----------
Rename nfslocking -> lockd

Modified Files:
--------------
    src/etc/rc.d:
        Makefile (r1.13 -> r1.14)

Added Files:
-----------
    src/etc/rc.d:
        lockd (r1.1)

Removed Files:
-------------
    src/etc/rc.d:
        nfslocking

-------------- next part --------------
--- /dev/null
+++ etc/rc.d/lockd
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm
+# $FreeBSD: src/etc/rc.d/lockd,v 1.18.6.1 2008/01/28 07:58:31 dougb Exp $
+# $MidnightBSD: src/etc/rc.d/lockd,v 1.1 2009/01/17 17:35:26 laffer1 Exp $
+
+# PROVIDE: lockd
+# REQUIRE: nfsserver nfsclient nfsd rpcbind statd
+# BEFORE:  DAEMON
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="lockd"
+rcvar=rpc_lockd_enable
+command="/usr/sbin/rpc.${name}"
+start_precmd='lockd_precmd'
+stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable'
+status_precmd=$stop_precmd
+
+# Make sure that we are either an NFS client or server, and that we get
+# the correct flags from rc.conf(5).
+#
+lockd_precmd()
+{
+	local ret
+	ret=0
+
+	if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable
+	then
+		ret=1
+	fi
+	if ! checkyesno rpcbind_enable && \
+	    ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
+	then
+		force_depend rpcbind || ret=1
+	fi
+	rc_flags=${rpc_lockd_flags}
+	return ${ret}
+}
+
+load_rc_config $name
+run_rc_command $1
--- etc/rc.d/nfslocking
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp $
-# $MidnightBSD: src/etc/rc.d/nfslocking,v 1.3 2007/09/28 22:17:23 laffer1 Exp $
-
-# PROVIDE: nfslocking
-# REQUIRE: nfsserver nfsclient nfsd
-# BEFORE:  DAEMON
-# KEYWORD: nojail
-
-. /etc/rc.subr
-
-# Save the (one) commandline argument in case it gets clobbered.
-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 ||
-    [ -n "$rc_force" ]'
-stop_precmd=$start_precmd
-status_precmd=$start_precmd
-
-# rpc.statd
-#
-name="statd"
-rcvar=rpc_statd_enable
-command="/usr/sbin/rpc.${name}"
-load_rc_config $name
-run_rc_command "$arg"
-
-# rpc.lockd
-#
-name="lockd"
-rcvar=rpc_lockd_enable
-command="/usr/sbin/rpc.${name}"
-load_rc_config $name
-run_rc_command "$arg"
Index: Makefile
===================================================================
RCS file: /home/cvs/src/etc/rc.d/Makefile,v
retrieving revision 1.13
retrieving revision 1.14
diff -L etc/rc.d/Makefile -L etc/rc.d/Makefile -u -r1.13 -r1.14
--- etc/rc.d/Makefile
+++ etc/rc.d/Makefile
@@ -20,12 +20,12 @@
 	ipnat ipsec ipxrouted isdnd \
 	jail \
 	kadmind kerberos kernel keyserv kldxref kpasswdd \
-	ldconfig local localpkg lpd \
+	ldconfig local localpkg lockd lpd \
 	mixer motd mountcritlocal mountcritremote \
 	mountd moused mroute6d mrouted msgs \
 	named natd netif netoptions \
 	network_ipv6 newsyslog nfsclient nfsd \
-	nfslocking nfsserver nisdomain nsswitch ntpd \
+	nfsserver nisdomain nsswitch ntpd \
 	othermta \
 	pf pflog pfsync \
 	powerd power_profile ppp pppoed pwcheck \


More information about the Midnightbsd-cvs mailing list