summaryrefslogtreecommitdiffstats
path: root/utils/mount/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* Makefile.am: Corrected a misspelling of overriddenSteve Dickson2012-05-171-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* autoconf: only link binaries that need it to libtirpcJeff Layton2012-01-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is essentially the same as the previous version, but has been respun to fix up some merge conflicts with some of Chuck's recent changes. When we first added tirpc support, we took a "big hammer" approach, and had it add libtirpc to $LIBS. That had the effect of making it so that that library was linked into every binary. That's unnecessary, and wasteful with memory. Don't let AC_CHECK_LIB add -ltirpc to $LIBS. Instead, have the autoconf tests set $(LIBTIRPC) in the makefiles, and have the programs that need it explicitly include that library. In the event that we're not using libtirpc, then set $LIBTIRPC to a blank string. This necessitates a change to the bindresvport_sa check too. Since that library is no longer included in $LIBS, we need to convert that check to use AC_CHECK_LIB instead of AC_CHECK_FUNCS. This patch also fixes a subtle bug. If the library was usable, but the includes were not, the test would set $enable_tirpc to "no", but HAVE_LIBTIRPC would still be true. That configuration would likely fail to build. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Do not compile unnecessary files when the libmount code is enableNeilBrown2011-06-291-4/+4
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: add --enable-libmount-mountKarel Zak2011-04-061-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to link mount.nfs with libmount from util-linux >= v2.19. The new libmount based code is enabled by CONFIG_LIBMOUNT and is stored in mount_libmount.c. The old code is not affected by this change. The libmount does not have officially stable API yet, so the --enable-libmount-mount is marked as experimental in the configure help output. The ./configure option is the same as we use in util-linux to enable support for libmount in mount(8). The addr= (and some other options necessary for remount/umount) are stored to /etc/mtab or to /dev/.mount/utab. The utab file is *private* libmount file. It's possible that some mount options (for example user=) will be moved to kernel, so the utab will not be necessary. About libmount: * supports systems without and with regular /etc/mtab * does not store VFS and FS mount options in userspace * manages user= option and evaluate permissions * parses VFS mount options and generate MS_* flags * parses /etc/{fstab,mtab}, /proc/mounts or /proc/self/mountinfo * long-term goal is to use the same code in all mount.<type> helpers Note, use LIBMOUNT_DEBUG=0xffff mount.nfs foo:/path /path to debug the library. On systems with util-linux v2.19 the findmnt(8) command uses libmount to list all/selected mount points: $ findmnt /path $ findmnt --mtab /path the --mtab appends userspace mount options (e.g. user=) to the output. CC: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: move generic functions to utils.c and network.cKarel Zak2011-04-061-1/+1
| | | | | | | | | Move generic code that could be shared between standard mount.nfs and libmount version to utils.c and network.c. CC: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* The example nfsmount.conf fileSteve Dickson2009-08-161-0/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* The new nfsmount.conf(5) man page and the update toSteve Dickson2009-08-161-0/+1
| | | | | | the nfs(5) man page Signed-off-by: Steve Dickson <steved@redhat.com>
* Added hooks to the mount command that allowSteve Dickson2009-08-161-1/+2
| | | | | | mount options to be set in a configuration file Signed-off-by: Steve Dickson <steved@redhat.com>
* Support routines used to read sections from the configuration fileSteve Dickson2009-08-161-0/+4
| | | | | | and parse them into comma separated mount options. Signed-off-by: Steve Dickson <steved@redhat.com>
* Traditionally the mount command has looked for a ":" to separate theChuck Lever2008-07-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | server's hostname from the export path in the mounted on device name, like this: mount server:/export /mounted/on/dir The server's hostname is "server" and the export path is "/export". You can also substitute a specific IPv4 network address for the server hostname, like this: mount 192.168.0.55:/export /mounted/on/dir Raw IPv6 addresses present a problem, however, because they look something like this: fe80::200:5aff:fe00:30b Note the use of colons. To get around the presence of colons, copy the Solaris convention used for raw NFS server IPv6 addresses, which is to wrap the raw IPv6 address with square brackets. This is also suggested in RFC 4038. Introduce a new device name parser that can support traditional device names and square brackets. Place the parser in a separate source file so both the mount and umount paths can derive the server's hostname and export pathname the same way. Bonus points: add a check for NFS URLs and display an appropriate error message in that case. This is cleaner than failing with "unknown host: nfs". Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Moved the kernel version-ing code into a new version.hChuck Lever2008-07-151-1/+1
| | | | | | | header file which allows the code to be shared Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* text-based mount.nfs: parse option strings into listsChuck Lever2007-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | Adapt a parsing trick used by Python. Parse mount option strings into an abstract data type so we don't have to copy and/or tokenize the whole option string multiple times while trying to manipulate the mount options. Then, just before calling the mount(2) system call, convert the object back into a C string. One major advantage of this approach is that we can copy the final version of the mount options into /etc/mtab when we're done, instead of copying in the original mount options that the user specified. Any fallback from NFS v3 to NFS v2 or TCP to UDP that was done by mount.nfs will be reflected in /etc/mtab. This patch adds methods for creating and manipulating mount option data objects. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: add new string tokenizer facilityChuck Lever2007-09-291-2/+2
| | | | | | | | | | | | | | | | To quote the strtok(3) man page: "Avoid using these functions." OK. We've created our own. The main reason for this is that strtok(3) doesn't handle quoted delimiters at all. We need to handle this: context="foo,bar" where 'context' is a single mount option that sets a token string that possibly uses the same delimiter that the mount command uses to separate options (that is, a comma). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Add new files for supporting string-ified mount optionsChuck Lever2007-08-111-2/+2
| | | | | | | | | | | | | | Introduce support files which contain code that builds string mount options and passes them to the kernel. This is a pre-requisite for actually enabling /sbin/mount.nfs to do text-based mounts. This is only partially complete at the moment, but is presented so that folks can start banging on the kernel mount option string parsing code. There are clearly still parts that are not implemented quite yet, such as bg and retry support, but it should be enough to get going. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* libnfs.a: eliminate another dependency on a global variableChuck Lever2007-07-301-2/+2
| | | | | | | | | | | | | | The file support/nfs/fstab.c, which is linked into libnfs.a, depends on the global variable "verbose." This variable is defined and used only in the mount command, and the functions in fstab.c are used only by the mount command. Move fstab.c and support/include/fstab.h to utils/mount. This file placement is also consistent with at least one other mount helper, mount.ocfs2. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Move network functions into a common source moduleChuck Lever2007-07-201-2/+2
| | | | | | | | Separate network oriented functions from filesystem oriented functions, for general cleanliness. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Create a common source module for reporting mount errorsChuck Lever2007-07-201-2/+5
| | | | | | | Clean up, and pre-requisite for subsequent fixes. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* Build mount.nfs by default, and install setuidNeil Brown2007-03-201-1/+2
| | | | Also fix a few bugs that came up in initial testing.
* Add nfs.5 man pageNeil Brown2007-03-161-1/+12
|
* Install mount.nfs* in /sbin instead of /usr/sbinNeil Brown2007-03-161-3/+7
| | | | | | This patch is now hard-coded in the Makefile.am and cannot be changed by configure. But as it needs to match what util-linux does, that is probably a good thing.
* Merge nfsmount.x and mount.x into mount.xAmit Gud2006-06-231-35/+3
| | | | | | | Merge utils/mount/nfsmount.x and support/export/mount.x into support/export/mount.x. Signed-off-by: Amit Gud <agud@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add support to auto-generate nfsmount* files for new nfs.mount programNeil Brown2006-06-161-0/+32
|
* Move NFS mount code from util-linux to nfs-utils - part 1Amit Gud2006-06-161-0/+38
Adds the mount directory and the code to mount and umount the NFS file system. Signed-off-by: Amit Gud <agud@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>