add sloppy mount option and nfs man page
This commit is contained in:
parent
25a44bc522
commit
538c985837
503
nfs-utils-1.0.9-mount-man-nfs.patch
Normal file
503
nfs-utils-1.0.9-mount-man-nfs.patch
Normal file
@ -0,0 +1,503 @@
|
||||
--- nfs-utils-1.0.9/utils/mount/nfs.man.kzak 2006-09-20 13:47:50.000000000 +0200
|
||||
+++ nfs-utils-1.0.9/utils/mount/nfs.man 2006-09-20 13:47:50.000000000 +0200
|
||||
@@ -0,0 +1,464 @@
|
||||
+.\" nfs.5 "Rick Sladkey" <jrs@world.std.com>
|
||||
+.\" Wed Feb 8 12:52:42 1995, faith@cs.unc.edu: updates for Ross Biro's
|
||||
+.\" patches. "
|
||||
+.TH NFS 5 "20 November 1993" "Linux 0.99" "Linux Programmer's Manual"
|
||||
+.SH NAME
|
||||
+nfs \- nfs and nfs4 fstab format and options
|
||||
+.SH SYNOPSIS
|
||||
+.B /etc/fstab
|
||||
+.SH DESCRIPTION
|
||||
+The
|
||||
+.I fstab
|
||||
+file contains information about which filesystems
|
||||
+to mount where and with what options.
|
||||
+For NFS mounts, it contains the server name and
|
||||
+exported server directory to mount from,
|
||||
+the local directory that is the mount point,
|
||||
+and the NFS specific options that control
|
||||
+the way the filesystem is mounted.
|
||||
+.P
|
||||
+Three different versions of the NFS protocol are
|
||||
+supported by the Linux NFS client:
|
||||
+NFS version 2, NFS version 3, and NFS version 4.
|
||||
+To mount via NFS version 2, use the
|
||||
+.BR nfs
|
||||
+file system type and specify
|
||||
+.BR nfsvers=2 .
|
||||
+Version 2 is the default protocol version for the
|
||||
+.BR nfs
|
||||
+file system type when
|
||||
+.BR nfsvers=
|
||||
+is not specified on the mount command.
|
||||
+To mount via NFS version 3, use the
|
||||
+.BR nfs
|
||||
+file system type and specify
|
||||
+.BR nfsvers=3 .
|
||||
+To mount via NFS version 4, use the
|
||||
+.BR nfs4
|
||||
+file system type.
|
||||
+The
|
||||
+.BR nfsvers=
|
||||
+keyword is not supported for the
|
||||
+.BR nfs4
|
||||
+file system type.
|
||||
+.P
|
||||
+These file system types share similar mount options;
|
||||
+the differences are listed below.
|
||||
+.P
|
||||
+Here is an example from an \fI/etc/fstab\fP file for an NFSv2 mount
|
||||
+over UDP.
|
||||
+.sp
|
||||
+.nf
|
||||
+.ta 2.5i +0.75i +0.75i +1.0i
|
||||
+server:/usr/local/pub /pub nfs rsize=32768,wsize=32768,timeo=14,intr
|
||||
+.fi
|
||||
+.P
|
||||
+Here is an example for an NFSv4 mount over TCP using Kerberos
|
||||
+5 mutual authentication.
|
||||
+.sp
|
||||
+.nf
|
||||
+.ta 2.5i +0.75i +0.75i +1.0i
|
||||
+server:/usr/local/pub /pub nfs4 proto=tcp,sec=krb5,hard,intr
|
||||
+.fi
|
||||
+.DT
|
||||
+.SS Options for the nfs file system type
|
||||
+.TP 1.5i
|
||||
+.I rsize=n
|
||||
+The number of bytes NFS uses when reading files from an NFS server.
|
||||
+The rsize is negotiated between the server and client to determine
|
||||
+the largest block size that both can support.
|
||||
+The value specified by this option is the maximum size that could
|
||||
+be used; however, the actual size used may be smaller.
|
||||
+Note: Setting this size to a value less than the largest supported
|
||||
+block size will adversely affect performance.
|
||||
+.TP 1.5i
|
||||
+.I wsize=n
|
||||
+The number of bytes NFS uses when writing files to an NFS server.
|
||||
+The wsize is negotiated between the server and client to determine
|
||||
+the largest block size that both can support.
|
||||
+The value specified by this option is the maximum size that could
|
||||
+be used; however, the actual size used may be smaller.
|
||||
+Note: Setting this size to a value less than the largest supported
|
||||
+block size will adversely affect performance.
|
||||
+.TP 1.5i
|
||||
+.I timeo=n
|
||||
+The value in tenths of a second before sending the
|
||||
+first retransmission after an RPC timeout.
|
||||
+The default value is 7 tenths of a second. After the first timeout,
|
||||
+the timeout is doubled after each successive timeout until a maximum
|
||||
+timeout of 60 seconds is reached or the enough retransmissions
|
||||
+have occured to cause a major timeout. Then, if the filesystem
|
||||
+is hard mounted, each new timeout cascade restarts at twice the
|
||||
+initial value of the previous cascade, again doubling at each
|
||||
+retransmission. The maximum timeout is always 60 seconds.
|
||||
+Better overall performance may be achieved by increasing the
|
||||
+timeout when mounting on a busy network, to a slow server, or through
|
||||
+several routers or gateways.
|
||||
+.TP 1.5i
|
||||
+.I retrans=n
|
||||
+The number of minor timeouts and retransmissions that must occur before
|
||||
+a major timeout occurs. The default is 3 timeouts. When a major timeout
|
||||
+occurs, the file operation is either aborted or a "server not responding"
|
||||
+message is printed on the console.
|
||||
+.TP 1.5i
|
||||
+.I acregmin=n
|
||||
+The minimum time in seconds that attributes of a regular file should
|
||||
+be cached before requesting fresh information from a server.
|
||||
+The default is 3 seconds.
|
||||
+.TP 1.5i
|
||||
+.I acregmax=n
|
||||
+The maximum time in seconds that attributes of a regular file can
|
||||
+be cached before requesting fresh information from a server.
|
||||
+The default is 60 seconds.
|
||||
+.TP 1.5i
|
||||
+.I acdirmin=n
|
||||
+The minimum time in seconds that attributes of a directory should
|
||||
+be cached before requesting fresh information from a server.
|
||||
+The default is 30 seconds.
|
||||
+.TP 1.5i
|
||||
+.I acdirmax=n
|
||||
+The maximum time in seconds that attributes of a directory can
|
||||
+be cached before requesting fresh information from a server.
|
||||
+The default is 60 seconds.
|
||||
+.TP 1.5i
|
||||
+.I actimeo=n
|
||||
+Using actimeo sets all of
|
||||
+.I acregmin,
|
||||
+.I acregmax,
|
||||
+.I acdirmin,
|
||||
+and
|
||||
+.I acdirmax
|
||||
+to the same value.
|
||||
+There is no default value.
|
||||
+.TP 1.5i
|
||||
+.I retry=n
|
||||
+The number of minutes to retry an NFS mount operation
|
||||
+in the foreground or background before giving up.
|
||||
+The default value for forground mounts is 2 minutes.
|
||||
+The default value for background mounts is 10000 minutes,
|
||||
+which is roughly one week.
|
||||
+.TP 1.5i
|
||||
+.I namlen=n
|
||||
+When an NFS server does not support version two of the
|
||||
+RPC mount protocol, this option can be used to specify
|
||||
+the maximum length of a filename that is supported on
|
||||
+the remote filesystem. This is used to support the
|
||||
+POSIX pathconf functions. The default is 255 characters.
|
||||
+.TP 1.5i
|
||||
+.I port=n
|
||||
+The numeric value of the port to connect to the NFS server on.
|
||||
+If the port number is 0 (the default) then query the
|
||||
+remote host's portmapper for the port number to use.
|
||||
+If the remote host's NFS daemon is not registered with
|
||||
+its portmapper, the standard NFS port number 2049 is
|
||||
+used instead.
|
||||
+.TP 1.5i
|
||||
+.I mountport=n
|
||||
+The numeric value of the
|
||||
+.B mountd
|
||||
+port.
|
||||
+.TP 1.5i
|
||||
+.I mounthost=name
|
||||
+The name of the host running
|
||||
+.B mountd .
|
||||
+.TP 1.5i
|
||||
+.I mountprog=n
|
||||
+Use an alternate RPC program number to contact the
|
||||
+mount daemon on the remote host. This option is useful
|
||||
+for hosts that can run multiple NFS servers.
|
||||
+The default value is 100005 which is the standard RPC
|
||||
+mount daemon program number.
|
||||
+.TP 1.5i
|
||||
+.I mountvers=n
|
||||
+Use an alternate RPC version number to contact the
|
||||
+mount daemon on the remote host. This option is useful
|
||||
+for hosts that can run multiple NFS servers.
|
||||
+The default value depends on which kernel you are using.
|
||||
+.TP 1.5i
|
||||
+.I nfsprog=n
|
||||
+Use an alternate RPC program number to contact the
|
||||
+NFS daemon on the remote host. This option is useful
|
||||
+for hosts that can run multiple NFS servers.
|
||||
+The default value is 100003 which is the standard RPC
|
||||
+NFS daemon program number.
|
||||
+.TP 1.5i
|
||||
+.I nfsvers=n
|
||||
+Use an alternate RPC version number to contact the
|
||||
+NFS daemon on the remote host. This option is useful
|
||||
+for hosts that can run multiple NFS servers.
|
||||
+The default value depends on which kernel you are using.
|
||||
+.TP 1.5i
|
||||
+.I vers=n
|
||||
+vers is an alternative to nfsvers and is compatible with
|
||||
+many other operating systems.
|
||||
+.TP 1.5i
|
||||
+.I nolock
|
||||
+Disable NFS locking. Do not start lockd.
|
||||
+This has to be used with some old NFS servers
|
||||
+that don't support locking.
|
||||
+.TP 1.5i
|
||||
+.I bg
|
||||
+If the first NFS mount attempt times out, retry the mount
|
||||
+in the background.
|
||||
+After a mount operation is backgrounded, all subsequent mounts
|
||||
+on the same NFS server will be backgrounded immediately, without
|
||||
+first attempting the mount.
|
||||
+A missing mount point is treated as a timeout,
|
||||
+to allow for nested NFS mounts.
|
||||
+.TP 1.5i
|
||||
+.I fg
|
||||
+If the first NFS mount attempt times out, retry the mount
|
||||
+in the foreground.
|
||||
+This is the complement of the
|
||||
+.I bg
|
||||
+option, and also the default behavior.
|
||||
+.TP 1.5i
|
||||
+.I soft
|
||||
+If an NFS file operation has a major timeout then report an I/O error to
|
||||
+the calling program.
|
||||
+The default is to continue retrying NFS file operations indefinitely.
|
||||
+.TP 1.5i
|
||||
+.I hard
|
||||
+If an NFS file operation has a major timeout then report
|
||||
+"server not responding" on the console and continue retrying indefinitely.
|
||||
+This is the default.
|
||||
+.TP 1.5i
|
||||
+.I intr
|
||||
+If an NFS file operation has a major timeout and it is hard mounted,
|
||||
+then allow signals to interupt the file operation and cause it to
|
||||
+return EINTR to the calling program. The default is to not
|
||||
+allow file operations to be interrupted.
|
||||
+.TP 1.5i
|
||||
+.I posix
|
||||
+Mount the NFS filesystem using POSIX semantics. This allows
|
||||
+an NFS filesystem to properly support the POSIX pathconf
|
||||
+command by querying the mount server for the maximum length
|
||||
+of a filename. To do this, the remote host must support version
|
||||
+two of the RPC mount protocol. Many NFS servers support only
|
||||
+version one.
|
||||
+.TP 1.5i
|
||||
+.I nocto
|
||||
+Suppress the retrieval of new attributes when creating a file.
|
||||
+.TP 1.5i
|
||||
+.I noac
|
||||
+Disable all forms of attribute caching entirely. This extracts a
|
||||
+significant performance penalty but it allows two different NFS clients
|
||||
+to get reasonable results when both clients are actively
|
||||
+writing to a common export on the server.
|
||||
+.TP 1.5i
|
||||
+.I noacl
|
||||
+Disables Access Control List (ACL) processing.
|
||||
+.TP 1.5i
|
||||
+.I sec=mode
|
||||
+Set the security flavor for this mount to "mode".
|
||||
+The default setting is \f3sec=sys\f1, which uses local
|
||||
+unix uids and gids to authenticate NFS operations (AUTH_SYS).
|
||||
+Other currently supported settings are:
|
||||
+\f3sec=krb5\f1, which uses Kerberos V5 instead of local unix uids
|
||||
+and gids to authenticate users;
|
||||
+\f3sec=krb5i\f1, which uses Kerberos V5 for user authentication
|
||||
+and performs integrity checking of NFS operations using secure
|
||||
+checksums to prevent data tampering; and
|
||||
+\f3sec=krb5p\f1, which uses Kerberos V5 for user authentication
|
||||
+and integrity checking, and encrypts NFS traffic to prevent
|
||||
+traffic sniffing (this is the most secure setting).
|
||||
+Note that there is a performance penalty when using integrity
|
||||
+or privacy.
|
||||
+.TP 1.5i
|
||||
+.I tcp
|
||||
+Mount the NFS filesystem using the TCP protocol instead of the
|
||||
+default UDP protocol. Many NFS servers only support UDP.
|
||||
+.TP 1.5i
|
||||
+.I udp
|
||||
+Mount the NFS filesystem using the UDP protocol. This
|
||||
+is the default.
|
||||
+.TP 1.5i
|
||||
+.I fsc
|
||||
+Unable the use of persistent caching to the local disk using
|
||||
+the FS-Cache facility for the given mount point.
|
||||
+.P
|
||||
+All of the non-value options have corresponding nooption forms.
|
||||
+For example, nointr means don't allow file operations to be
|
||||
+interrupted.
|
||||
+.SS Options for the nfs4 file system type
|
||||
+.TP 1.5i
|
||||
+.I rsize=n
|
||||
+The number of bytes nfs4 uses when reading files from the server.
|
||||
+The rsize is negotiated between the server and client to determine
|
||||
+the largest block size that both can support.
|
||||
+The value specified by this option is the maximum size that could
|
||||
+be used; however, the actual size used may be smaller.
|
||||
+Note: Setting this size to a value less than the largest supported
|
||||
+block size will adversely affect performance.
|
||||
+.TP 1.5i
|
||||
+.I wsize=n
|
||||
+The number of bytes nfs4 uses when writing files to the server.
|
||||
+The wsize is negotiated between the server and client to determine
|
||||
+the largest block size that both can support.
|
||||
+The value specified by this option is the maximum size that could
|
||||
+be used; however, the actual size used may be smaller.
|
||||
+Note: Setting this size to a value less than the largest supported
|
||||
+block size will adversely affect performance.
|
||||
+.TP 1.5i
|
||||
+.I timeo=n
|
||||
+The value in tenths of a second before sending the
|
||||
+first retransmission after an RPC timeout.
|
||||
+The default value depends on whether
|
||||
+.IR proto=udp
|
||||
+or
|
||||
+.IR proto=tcp
|
||||
+is in effect (see below).
|
||||
+The default value for UDP is 7 tenths of a second.
|
||||
+The default value for TCP is 60 seconds.
|
||||
+After the first timeout,
|
||||
+the timeout is doubled after each successive timeout until a maximum
|
||||
+timeout of 60 seconds is reached or the enough retransmissions
|
||||
+have occured to cause a major timeout. Then, if the filesystem
|
||||
+is hard mounted, each new timeout cascade restarts at twice the
|
||||
+initial value of the previous cascade, again doubling at each
|
||||
+retransmission. The maximum timeout is always 60 seconds.
|
||||
+.TP 1.5i
|
||||
+.I retrans=n
|
||||
+The number of minor timeouts and retransmissions that must occur before
|
||||
+a major timeout occurs. The default is 5 timeouts for
|
||||
+.IR proto=udp
|
||||
+and 2 timeouts for
|
||||
+.IR proto=tcp .
|
||||
+When a major timeout
|
||||
+occurs, the file operation is either aborted or a "server not responding"
|
||||
+message is printed on the console.
|
||||
+.TP 1.5i
|
||||
+.I acregmin=n
|
||||
+The minimum time in seconds that attributes of a regular file should
|
||||
+be cached before requesting fresh information from a server.
|
||||
+The default is 3 seconds.
|
||||
+.TP 1.5i
|
||||
+.I acregmax=n
|
||||
+The maximum time in seconds that attributes of a regular file can
|
||||
+be cached before requesting fresh information from a server.
|
||||
+The default is 60 seconds.
|
||||
+.TP 1.5i
|
||||
+.I acdirmin=n
|
||||
+The minimum time in seconds that attributes of a directory should
|
||||
+be cached before requesting fresh information from a server.
|
||||
+The default is 30 seconds.
|
||||
+.TP 1.5i
|
||||
+.I acdirmax=n
|
||||
+The maximum time in seconds that attributes of a directory can
|
||||
+be cached before requesting fresh information from a server.
|
||||
+The default is 60 seconds.
|
||||
+.TP 1.5i
|
||||
+.I actimeo=n
|
||||
+Using actimeo sets all of
|
||||
+.I acregmin,
|
||||
+.I acregmax,
|
||||
+.I acdirmin,
|
||||
+and
|
||||
+.I acdirmax
|
||||
+to the same value.
|
||||
+There is no default value.
|
||||
+.TP 1.5i
|
||||
+.I retry=n
|
||||
+The number of minutes to retry an NFS mount operation
|
||||
+in the foreground or background before giving up.
|
||||
+The default value for forground mounts is 2 minutes.
|
||||
+The default value for background mounts is 10000 minutes,
|
||||
+which is roughly one week.
|
||||
+.TP 1.5i
|
||||
+.I port=n
|
||||
+The numeric value of the port to connect to the NFS server on.
|
||||
+If the port number is 0 (the default) then query the
|
||||
+remote host's portmapper for the port number to use.
|
||||
+If the remote host's NFS daemon is not registered with
|
||||
+its portmapper, the standard NFS port number 2049 is
|
||||
+used instead.
|
||||
+.TP 1.5i
|
||||
+.I proto=n
|
||||
+Mount the NFS filesystem using a specific network protocol
|
||||
+instead of the default UDP protocol.
|
||||
+Many NFS version 4 servers only support TCP.
|
||||
+Valid protocol types are
|
||||
+.IR udp
|
||||
+and
|
||||
+.IR tcp .
|
||||
+.TP 1.5i
|
||||
+.I clientaddr=n
|
||||
+On a multi-homed client, this
|
||||
+causes the client to use a specific callback address when
|
||||
+communicating with an NFS version 4 server.
|
||||
+This option is currently ignored.
|
||||
+.TP 1.5i
|
||||
+.I sec=mode
|
||||
+Same as \f3sec=mode\f1 for the nfs filesystem type (see above).
|
||||
+.TP 1.5i
|
||||
+.I bg
|
||||
+If an NFS mount attempt times out, retry the mount
|
||||
+in the background.
|
||||
+After a mount operation is backgrounded, all subsequent mounts
|
||||
+on the same NFS server will be backgrounded immediately, without
|
||||
+first attempting the mount.
|
||||
+A missing mount point is treated as a timeout,
|
||||
+to allow for nested NFS mounts.
|
||||
+.TP 1.5i
|
||||
+.I fg
|
||||
+If the first NFS mount attempt times out, retry the mount
|
||||
+in the foreground.
|
||||
+This is the complement of the
|
||||
+.I bg
|
||||
+option, and also the default behavior.
|
||||
+.TP 1.5i
|
||||
+.I soft
|
||||
+If an NFS file operation has a major timeout then report an I/O error to
|
||||
+the calling program.
|
||||
+The default is to continue retrying NFS file operations indefinitely.
|
||||
+.TP 1.5i
|
||||
+.I hard
|
||||
+If an NFS file operation has a major timeout then report
|
||||
+"server not responding" on the console and continue retrying indefinitely.
|
||||
+This is the default.
|
||||
+.TP 1.5i
|
||||
+.I intr
|
||||
+If an NFS file operation has a major timeout and it is hard mounted,
|
||||
+then allow signals to interupt the file operation and cause it to
|
||||
+return EINTR to the calling program. The default is to not
|
||||
+allow file operations to be interrupted.
|
||||
+.TP 1.5i
|
||||
+.I nocto
|
||||
+Suppress the retrieval of new attributes when creating a file.
|
||||
+.TP 1.5i
|
||||
+.I noac
|
||||
+Disable attribute caching, and force synchronous writes.
|
||||
+This extracts a
|
||||
+server performance penalty but it allows two different NFS clients
|
||||
+to get reasonable good results when both clients are actively
|
||||
+writing to common filesystem on the server.
|
||||
+.TP 1.5i
|
||||
+.I fsc
|
||||
+Unable the use of persistent caching to the local disk using
|
||||
+the FS-Cache facility for the given mount point.
|
||||
+.P
|
||||
+All of the non-value options have corresponding nooption forms.
|
||||
+For example, nointr means don't allow file operations to be
|
||||
+interrupted.
|
||||
+.SH FILES
|
||||
+.I /etc/fstab
|
||||
+.SH "SEE ALSO"
|
||||
+.BR fstab "(5), " mount "(8), " umount "(8), " exports (5)
|
||||
+.SH AUTHOR
|
||||
+"Rick Sladkey" <jrs@world.std.com>
|
||||
+.SH BUGS
|
||||
+The posix, and nocto options are parsed by mount
|
||||
+but currently are silently ignored.
|
||||
+.P
|
||||
+The tcp and namlen options are implemented but are not currently
|
||||
+supported by the Linux kernel.
|
||||
+.P
|
||||
+The umount command should notify the server
|
||||
+when an NFS filesystem is unmounted.
|
||||
+.P
|
||||
+Checking files on NFS filesystem referenced by file descriptors (i.e. the
|
||||
+.BR fcntl
|
||||
+and
|
||||
+.BR ioctl
|
||||
+families of functions) may lead to inconsistent result due to the lack of
|
||||
+consistency check in kernel even if noac is used.
|
||||
--- nfs-utils-1.0.9/utils/mount/Makefile.am.kzak 2006-09-20 13:47:57.000000000 +0200
|
||||
+++ nfs-utils-1.0.9/utils/mount/Makefile.am 2006-09-20 13:51:36.000000000 +0200
|
||||
@@ -1,9 +1,10 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
man8_MANS = mount.nfs.man umount.nfs.man
|
||||
+man5_MANS = nfs.man
|
||||
|
||||
sbin_PROGRAMS = mount.nfs
|
||||
-EXTRA_DIST = nfsmount.x $(man8_MANS)
|
||||
+EXTRA_DIST = nfsmount.x $(man8_MANS) $(man5_MANS)
|
||||
mount_nfs_SOURCES = mount.c nfsmount.c nfs4mount.c nfsumount.c \
|
||||
mount_constants.h nfs4_mount.h nfs_mount4.h
|
||||
|
||||
@@ -29,6 +30,11 @@
|
||||
inst=`echo $$m | sed -e 's/man$$/8/'`; \
|
||||
rm -f $$inst ; \
|
||||
done)
|
||||
+ (cd $(DESTDIR)$(man5dir) && \
|
||||
+ for m in $(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS); do \
|
||||
+ inst=`echo $$m | sed -e 's/man$$/5/'`; \
|
||||
+ rm -f $$inst ; \
|
||||
+ done)
|
||||
|
||||
uninstall-man-links:
|
||||
(cd $(DESTDIR)$(man8dir) && \
|
||||
@@ -36,4 +42,9 @@
|
||||
inst=`echo $$m | sed -e 's/man$$/8/'`; \
|
||||
rm -f $$inst ; \
|
||||
done)
|
||||
+ (cd $(DESTDIR)$(man5dir) && \
|
||||
+ for m in $(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS); do \
|
||||
+ inst=`echo $$m | sed -e 's/man$$/5/'`; \
|
||||
+ rm -f $$inst ; \
|
||||
+ done)
|
||||
|
124
nfs-utils-1.0.9-mount-sloppy.patch
Normal file
124
nfs-utils-1.0.9-mount-sloppy.patch
Normal file
@ -0,0 +1,124 @@
|
||||
--- nfs-utils-1.0.9/utils/mount/nfs4mount.c.sloppy 2006-09-20 12:08:39.000000000 +0200
|
||||
+++ nfs-utils-1.0.9/utils/mount/nfs4mount.c 2006-09-20 12:08:39.000000000 +0200
|
||||
@@ -50,6 +50,7 @@
|
||||
#endif
|
||||
|
||||
extern int verbose;
|
||||
+extern int sloppy;
|
||||
|
||||
char *IDMAPLCK = DEFAULT_DIR "/rpcidmapd";
|
||||
#define idmapd_check() do { \
|
||||
@@ -338,7 +339,7 @@
|
||||
nocto = !val;
|
||||
else if (!strcmp(opt, "ac"))
|
||||
noac = !val;
|
||||
- else {
|
||||
+ else if (!sloppy) {
|
||||
printf(_("unknown nfs mount option: "
|
||||
"%s%s\n"), val ? "" : "no", opt);
|
||||
goto fail;
|
||||
--- nfs-utils-1.0.9/utils/mount/mount.c.sloppy 2006-09-20 12:08:39.000000000 +0200
|
||||
+++ nfs-utils-1.0.9/utils/mount/mount.c 2006-09-20 12:10:31.000000000 +0200
|
||||
@@ -44,6 +44,7 @@
|
||||
int nomtab;
|
||||
int verbose;
|
||||
int mounttype;
|
||||
+int sloppy;
|
||||
|
||||
static struct option longopts[] = {
|
||||
{ "fake", 0, 0, 'f' },
|
||||
@@ -239,6 +240,7 @@
|
||||
printf("\t-w\t\tMount file system read-write\n");
|
||||
printf("\t-f\t\tFake mount, don't actually mount\n");
|
||||
printf("\t-n\t\tDo not update /etc/mtab\n");
|
||||
+ printf("\t-s\t\tTolerate sloppy mount options rather than failing.\n");
|
||||
printf("\t-h\t\tPrint this help\n");
|
||||
printf("\tversion\t\tnfs4 - NFS version 4, nfs - older NFS version supported\n");
|
||||
printf("\tnfsoptions\tRefer mount.nfs(8) or nfs(5)\n\n");
|
||||
@@ -373,7 +375,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
- while ((c = getopt_long (argc - 2, argv + 2, "rt:vVwfno:h",
|
||||
+ while ((c = getopt_long (argc - 2, argv + 2, "rt:vVwfno:hs",
|
||||
longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'r':
|
||||
@@ -403,6 +405,9 @@
|
||||
else
|
||||
mount_opts = xstrdup(optarg);
|
||||
break;
|
||||
+ case 's':
|
||||
+ ++sloppy;
|
||||
+ break;
|
||||
case 128: /* bind */
|
||||
mounttype = MS_BIND;
|
||||
break;
|
||||
--- nfs-utils-1.0.9/utils/mount/nfsmount.c.sloppy 2006-09-20 12:08:39.000000000 +0200
|
||||
+++ nfs-utils-1.0.9/utils/mount/nfsmount.c 2006-09-20 12:08:39.000000000 +0200
|
||||
@@ -104,6 +104,7 @@
|
||||
static char errbuf[BUFSIZ];
|
||||
static char *erreob = &errbuf[BUFSIZ];
|
||||
extern int verbose;
|
||||
+extern int sloppy;
|
||||
|
||||
/* Convert RPC errors into strings */
|
||||
int rpc_strerror(int);
|
||||
@@ -606,13 +607,13 @@
|
||||
} else if (!strcmp(opt, "namlen")) {
|
||||
if (nfs_mount_version >= 2)
|
||||
data->namlen = val;
|
||||
- else
|
||||
+ else if (!sloppy)
|
||||
goto bad_parameter;
|
||||
#endif
|
||||
} else if (!strcmp(opt, "addr")) {
|
||||
/* ignore */;
|
||||
continue;
|
||||
- } else
|
||||
+ } else if (!sloppy)
|
||||
goto bad_parameter;
|
||||
sprintf(cbuf, "%s=%s,", opt, opteq+1);
|
||||
} else if (opteq) {
|
||||
@@ -629,7 +630,7 @@
|
||||
mnt_pmap->pm_prot = IPPROTO_TCP;
|
||||
data->flags |= NFS_MOUNT_TCP;
|
||||
#endif
|
||||
- } else
|
||||
+ } else if (!sloppy)
|
||||
goto bad_parameter;
|
||||
#if NFS_MOUNT_VERSION >= 5
|
||||
} else if (!strcmp(opt, "sec")) {
|
||||
@@ -658,7 +659,7 @@
|
||||
data->pseudoflavor = AUTH_GSS_SPKMI;
|
||||
else if (!strcmp(secflavor, "spkm3p"))
|
||||
data->pseudoflavor = AUTH_GSS_SPKMP;
|
||||
- else {
|
||||
+ else if (!sloppy) {
|
||||
printf(_("Warning: Unrecognized security flavor %s.\n"),
|
||||
secflavor);
|
||||
goto bad_parameter;
|
||||
@@ -677,7 +678,7 @@
|
||||
goto bad_parameter;
|
||||
}
|
||||
strncpy(data->context, context, NFS_MAX_CONTEXT_LEN);
|
||||
- } else
|
||||
+ } else if (!sloppy)
|
||||
goto bad_parameter;
|
||||
sprintf(cbuf, "%s=%s,", opt, opteq+1);
|
||||
} else {
|
||||
@@ -768,9 +769,11 @@
|
||||
#endif
|
||||
} else {
|
||||
bad_option:
|
||||
- printf(_("Unsupported nfs mount option: "
|
||||
- "%s%s\n"), val ? "" : "no", opt);
|
||||
- goto out_bad;
|
||||
+ if (!sloppy) {
|
||||
+ printf(_("Unsupported nfs mount option: "
|
||||
+ "%s%s\n"), val ? "" : "no", opt);
|
||||
+ goto out_bad;
|
||||
+ }
|
||||
}
|
||||
sprintf(cbuf, val ? "%s,":"no%s,", opt);
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
Summary: NFS utlilities and supporting daemons for the kernel NFS server.
|
||||
Summary: NFS utlilities and supporting clients and daemons for the kernel NFS server.
|
||||
Name: nfs-utils
|
||||
Version: 1.0.9
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Epoch: 1
|
||||
|
||||
# group all 32bit related archs
|
||||
@ -30,6 +30,8 @@ Patch55: nfs-utils-1.0.9-mount-options-v3.patch
|
||||
Patch56: nfs-utils-1.0.9-lazy-umount.patch
|
||||
Patch57: nfs-utils-1.0.9-mount-fsc.patch
|
||||
Patch58: nfs-utils-1.0.9-krb5-memory.patch
|
||||
Patch59: nfs-utils-1.0.9-mount-sloppy.patch
|
||||
Patch60: nfs-utils-1.0.9-mount-man-nfs.patch
|
||||
|
||||
Patch100: nfs-utils-1.0.9-compile.patch
|
||||
|
||||
@ -67,6 +69,8 @@ mount daemon on a remote host for information about the NFS (Network File
|
||||
System) server on the remote host. For example, showmount can display the
|
||||
clients which are mounted on that host.
|
||||
|
||||
This package also contains the mount.nfs and umount.nfs program.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch50 -p1
|
||||
@ -78,6 +82,8 @@ clients which are mounted on that host.
|
||||
%patch56 -p1
|
||||
%patch57 -p1
|
||||
%patch58 -p1
|
||||
%patch59 -p1
|
||||
%patch60 -p1
|
||||
|
||||
# Do the magic to get things to compile
|
||||
%patch100 -p1
|
||||
@ -251,6 +257,11 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Sep 20 2006 Karel Zak <kzak@redhat.com> 1.0.9-7
|
||||
- Added support for the mount -s (sloppy) option (#205038)
|
||||
- Added nfs.5 man page from util-linux
|
||||
- Added info about [u]mount.nfs to the package description
|
||||
|
||||
* Mon Sep 11 2006 <SteveD@RedHat.com> 1.0.9-6
|
||||
- Removed the compiling of getiversion and getkversion since
|
||||
UTS_RELEASE is no longer defined and these binary are
|
||||
|
Loading…
Reference in New Issue
Block a user