Update of /cvsroot/ssic-linux/openssi/nfs-utils/utils/mountd
In directory sc8-pr-cvs1:/tmp/cvs-serv16050/utils/mountd
Modified Files:
Makefile mountd.c
Log Message:
Sync w/ OPENSSI-RH branch
Index: Makefile
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/nfs-utils/utils/mountd/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Makefile 4 Jun 2003 00:56:23 -0000 1.1.1.1
--- Makefile 13 Nov 2003 23:32:02 -0000 1.2
***************
*** 7,11 ****
OBJS = mountd.o mount_dispatch.o auth.o rmtab.o
LIBDEPS = $(TOP)support/lib/libexport.a $(TOP)/support/lib/libnfs.a
! LIBS = -lexport -lnfs -lmisc $(LIBBSD) $(LIBWRAP) $(LIBNSL)
MAN8 = mountd
--- 7,11 ----
OBJS = mountd.o mount_dispatch.o auth.o rmtab.o
LIBDEPS = $(TOP)support/lib/libexport.a $(TOP)/support/lib/libnfs.a
! LIBS = -lexport -lnfs -lmisc $(LIBBSD) $(LIBWRAP) $(LIBNSL) -lcluster
MAN8 = mountd
Index: mountd.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/nfs-utils/utils/mountd/mountd.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** mountd.c 4 Jun 2003 00:56:23 -0000 1.1.1.1
--- mountd.c 13 Nov 2003 23:32:02 -0000 1.2
***************
*** 387,390 ****
--- 387,392 ----
}
+ #define NAMESIZE 256
+
int
main(int argc, char **argv)
***************
*** 397,400 ****
--- 399,405 ----
struct sigaction sa;
struct rlimit rlim;
+ char buffer[NAMESIZE];
+ struct hostent *cvip_hp;
+ int ssi;
/* Parse the command line options and arguments. */
***************
*** 492,504 ****
}
! if (nfs_version & 0x1)
rpc_init("mountd", MOUNTPROG, MOUNTVERS,
mount_dispatch, port);
! if (nfs_version & (0x1 << 1))
rpc_init("mountd", MOUNTPROG, MOUNTVERS_POSIX,
mount_dispatch, port);
! if (nfs_version & (0x1 << 2))
rpc_init("mountd", MOUNTPROG, MOUNTVERS_NFSV3,
mount_dispatch, port);
sa.sa_handler = killer;
--- 497,540 ----
}
! /*
! * See if we are running on an SSI kernel
! */
! ssi = cluster_ssiconfig();
!
! if (ssi) {
! if (cluster_get_clustername(&buffer, NAMESIZE) == -1) {
! xlog(L_FATAL, "mountd: cannot uname: %s\n",
! strerror(errno));
! exit(1);
! }
! if ((cvip_hp = gethostbyname(buffer)) == NULL) {
! xlog(L_FATAL, "mountd: gethostbyname for IPVS error\n");
! exit(1);
! }
! }
! if (nfs_version & 0x1) {
! if (ssi)
! rpc_init_addr("mountd", MOUNTPROG, MOUNTVERS,
! mount_dispatch, port, *(unsigned long
*)cvip_hp->h_addr, SSI_PMAP_CVIP);
! else
rpc_init("mountd", MOUNTPROG, MOUNTVERS,
mount_dispatch, port);
! }
! if (nfs_version & (0x1 << 1)) {
! if (ssi)
! rpc_init_addr("mountd", MOUNTPROG, MOUNTVERS_POSIX,
! mount_dispatch, port, *(unsigned long
*)cvip_hp->h_addr, SSI_PMAP_CVIP);
! else
rpc_init("mountd", MOUNTPROG, MOUNTVERS_POSIX,
mount_dispatch, port);
! }
! if (nfs_version & (0x1 << 2)) {
! if (ssi)
! rpc_init_addr("mountd", MOUNTPROG, MOUNTVERS_NFSV3,
! mount_dispatch, port, *(unsigned long
*)cvip_hp->h_addr, SSI_PMAP_CVIP);
! else
rpc_init("mountd", MOUNTPROG, MOUNTVERS_NFSV3,
mount_dispatch, port);
+ }
sa.sa_handler = killer;
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
|