From fa2058d9dc483dbed373ddc04a898ddd7f135f6f Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 22 Feb 2007 16:41:24 +1100 Subject: [PATCH] Remove rpc.lockd This was only needed for kernels 2.2.14 through 2.2.17. These have long since been superceded, so remove some dead weight. --- configure.in | 1 - support/include/nfs/nfs.h | 4 --- support/include/nfslib.h | 3 --- support/nfs/Makefile.am | 2 +- support/nfs/lockdsvc.c | 22 ---------------- utils/Makefile.am | 1 - utils/lockd/Makefile.am | 55 --------------------------------------- utils/lockd/lockd.c | 54 -------------------------------------- utils/lockd/lockd.man | 24 ----------------- 9 files changed, 1 insertion(+), 165 deletions(-) delete mode 100644 support/nfs/lockdsvc.c delete mode 100644 utils/lockd/Makefile.am delete mode 100644 utils/lockd/lockd.c delete mode 100644 utils/lockd/lockd.man diff --git a/configure.in b/configure.in index 61e5be2..c0148bd 100644 --- a/configure.in +++ b/configure.in @@ -331,7 +331,6 @@ AC_CONFIG_FILES([ utils/exportfs/Makefile utils/gssd/Makefile utils/idmapd/Makefile - utils/lockd/Makefile utils/mount/Makefile utils/mountd/Makefile utils/nfsd/Makefile diff --git a/support/include/nfs/nfs.h b/support/include/nfs/nfs.h index f0286b2..fc26f4e 100644 --- a/support/include/nfs/nfs.h +++ b/support/include/nfs/nfs.h @@ -39,10 +39,6 @@ struct nfs_fh_old { #define NFSCTL_GETFD 7 /* get an fh by path (used by mountd) */ #define NFSCTL_GETFS 8 /* get an fh by path with max size (used by mountd) */ -/* Above this is for lockd. */ -#define NFSCTL_LOCKD 0x10000 -#define LOCKDCTL_SVC NFSCTL_LOCKD - #define NFSCTL_VERUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << ((_v) - 1))) #define NFSCTL_UDPUNSET(_cltbits) ((_cltbits) &= ~(1 << (17 - 1))) #define NFSCTL_TCPUNSET(_cltbits) ((_cltbits) &= ~(1 << (18 - 1))) diff --git a/support/include/nfslib.h b/support/include/nfslib.h index c085029..1372635 100644 --- a/support/include/nfslib.h +++ b/support/include/nfslib.h @@ -144,9 +144,6 @@ int check_new_cache(void); void closeall(int min); -/* lockd. */ -int lockdsvc(); - int svctcp_socket (u_long __number, int __reuse); int svcudp_socket (u_long __number, int __reuse); diff --git a/support/nfs/Makefile.am b/support/nfs/Makefile.am index af8181d..6006df6 100644 --- a/support/nfs/Makefile.am +++ b/support/nfs/Makefile.am @@ -3,7 +3,7 @@ noinst_LIBRARIES = libnfs.a libnfs_a_SOURCES = exports.c rmtab.c xio.c rpcmisc.c rpcdispatch.c \ xlog.c xcommon.c wildmat.c nfssvc.c nfsclient.c \ - nfsexport.c getfh.c nfsctl.c lockdsvc.c \ + nfsexport.c getfh.c nfsctl.c \ svc_socket.c cacheio.c closeall.c conn.c fstab.c nfs_mntent.c MAINTAINERCLEANFILES = Makefile.in diff --git a/support/nfs/lockdsvc.c b/support/nfs/lockdsvc.c deleted file mode 100644 index ca1e862..0000000 --- a/support/nfs/lockdsvc.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * support/nfs/nfssvc.c - * - * Run an NFS daemon. - * - * Copyright (C) 1995, 1996 Olaf Kirch - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -int -lockdsvc() -{ - struct nfsctl_arg arg; - - arg.ca_version = NFSCTL_VERSION; - return nfsctl(LOCKDCTL_SVC, &arg, NULL); -} diff --git a/utils/Makefile.am b/utils/Makefile.am index 723657c..c1bc059 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -20,7 +20,6 @@ endif SUBDIRS = \ exportfs \ - lockd \ mountd \ nfsd \ nfsstat \ diff --git a/utils/lockd/Makefile.am b/utils/lockd/Makefile.am deleted file mode 100644 index e1546a4..0000000 --- a/utils/lockd/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -## Process this file with automake to produce Makefile.in - -man8_MANS = lockd.man -EXTRA_DIST = $(man8_MANS) - -RPCPREFIX = rpc. -KPREFIX = @kprefix@ -sbin_PROGRAMS = lockd -lockd_SOURCES = lockd.c -lockd_LDADD = ../../support/export/libexport.a \ - ../../support/nfs/libnfs.a \ - ../../support/misc/libmisc.a - -MAINTAINERCLEANFILES = Makefile.in - -####################################################################### -# The following allows the current practice of having -# daemons renamed during the install to include RPCPREFIX -# and the KPREFIX -# This could all be done much easier with program_transform_name -# ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ ) -# but that also renames the man pages, which the current -# practice does not do. -install-exec-hook: - (cd $(DESTDIR)$(sbindir) && \ - for p in $(sbin_PROGRAMS); do \ - mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ - done) -uninstall-hook: - (cd $(DESTDIR)$(sbindir) && \ - for p in $(sbin_PROGRAMS); do \ - rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\ - done) - - -# XXX This makes some assumptions about what automake does. -# XXX But there is no install-man-hook or install-man-local. -install-man: install-man8 install-man-links -uninstall-man: uninstall-man8 uninstall-man-links - -install-man-links: - (cd $(DESTDIR)$(man8dir) && \ - for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ - inst=`echo $$m | sed -e 's/man$$/8/'`; \ - rm -f $(RPCPREFIX)$$inst ; \ - $(LN_S) $$inst $(RPCPREFIX)$$inst ; \ - done) - -uninstall-man-links: - (cd $(DESTDIR)$(man8dir) && \ - for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \ - inst=`echo $$m | sed -e 's/man$$/8/'`; \ - rm -f $(RPCPREFIX)$$inst ; \ - done) - diff --git a/utils/lockd/lockd.c b/utils/lockd/lockd.c deleted file mode 100644 index 71b31b0..0000000 --- a/utils/lockd/lockd.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * lockd - * - * This is the user level part of lockd. This is very primitive, because - * all the work is now done in the kernel module. - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include - - - -static void usage(const char *); - -int -main(int argc, char **argv) -{ - int error; - - if (argc > 1) - usage (argv [0]); - - if (chdir(NFS_STATEDIR)) { - fprintf(stderr, "%s: chdir(%s) failed: %s\n", - argv [0], NFS_STATEDIR, strerror(errno)); - exit(1); - } - - if ((error = lockdsvc()) < 0) { - if (errno == EINVAL) - /* Ignore EINVAL since kernel may start - lockd automatically. */ - error = 0; - else - perror("lockdsvc"); - } - - return (error != 0); -} - -static void -usage(const char *prog) -{ - fprintf(stderr, "usage:\n%s\n", prog); - exit(2); -} diff --git a/utils/lockd/lockd.man b/utils/lockd/lockd.man deleted file mode 100644 index aa76019..0000000 --- a/utils/lockd/lockd.man +++ /dev/null @@ -1,24 +0,0 @@ -.\" -.\" lockd(8) -.\" -.\" Copyright (C) 2000 Chip Salzenberg -.\" -.TH rpc.lockd 8 "25 Feb 2000" -.SH NAME -rpc.lockd \- start kernel lockd process -.SH SYNOPSIS -.B "rpc.lockd -.SH DESCRIPTION -The -.B rpc.lockd -program starts the NFS lock manager (NLM) on kernels that don't start -it automatically. However, since most kernels \fIdo\fR start it -automatically, -.BR rpc.lockd . -is usually not required. Even so, running it anyway is harmless. -.SH SEE ALSO -.BR rpc.statd (8), -.BR rpc.nfsd (8) -.SH AUTHORS -.br -H.J. Lu -- 2.39.5