summaryrefslogtreecommitdiffstats
path: root/sbin/umount
Commit message (Collapse)AuthorAgeFilesLines
* Finish up umntall support. init now passed an argument to thedillon1999-11-222-5/+24
| | | | | | | | | rundown script 'reboot' or 'single'. ISO support (which never worked) has been removed from mount_nfs. mount_nfs and umount now use mounttab, which allows umntall to work properly. The rc scripts now call umntall as appropriate. Submitted by: Martin Blapp <mb@imp.ch>
* Fix a logic problem that broke umount -a.green1999-10-291-4/+5
| | | | Reported by: Martin Blapp <mb@imp.ch>
* Small bugfixes (point not getting marked in one case, string not NUL andgreen1999-10-231-14/+14
| | | | | | wrong size in the other.) Submitted by: Martin Blapp <mb@imp.ch>
* Fix a few things. Unbogosify a free(), {,UN}MARK with correct args, andgreen1999-10-181-22/+22
| | | | | | fix count checks. Submitted by: Martin Blapp <mb@imp.ch>
* quoting << Martin_Blappgreen1999-10-172-147/+418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Completly changed the internals of umount(8). We do three checks now to see if 'argv' is in the mounttable. It they all fail, we return to main and print a warning. - fixed the umount mount-order. The checks are rather complex to do this. Cause umount(8) should also be able to unmount several devices at once ('umount -a', 'umount -A', 'umount /mnt /mnt2'), the mount-order get's important. I added checks to mark and unmark already unmounted devices. - Various fixes with nfs-unmounts (no rpc-calls were done, or they were done although there was an existing mount). Since we allow overlay-mounts, we should also handle them properly. - Translate the deprecated nfs-syntax with '@' to ':' like mount_nfs does. The ':' syntax has now precedence, but '@' still works. - 'umount -v' is now fixed for all cases and doesn't print garbage like two times the mountpoint etc. - removed non documented and useless umount '-F'. - hanged nfsmounts can now unmounted 'without' any problems. I've removed stat() and realpath() checks on the mountpoint. Instead we just do a realpath() on the basedir of the mountpath and add the dirname again. Implemented this as an idea from phk. But there are still vfs-restrictions if the nfs_mount is busy. If there are unwritten metadata on a hanged nfs-mount, and we modify nfs_vfsops.c to not return EBUSY, we get a deadlock :( The problem has now moved from userland to kernel. - removed the BUGS part from the umount(8) manpage. - Converted it to ANSI C (more than 60% of the code have changed). Martin_Blapp Fixed PR's ---------- o [1999/02/03] bin/9893 NFS umount of regular file impossible s [1995/11/27] bin/841 stale nfs mounts cannot be umounted o [1999/08/01] bin/12911 alfred NFS umounts are not properly done if just the mountpoint gets umounted Only partially solved: ---------------------- The problem is now in kernel: o [1999/04/07] bin/11005 `umount -f' does not work if the NFS-server is down. PR: bin/9893 bin/841 bin/12911 bin/11005 Submitted by: Martin Blapp <mb@imp.ch>
* Fix -Wall warningsn_hibma1999-10-081-2/+3
| | | | Submitted-By: Martin Blapp <mblapp@kassiopeja.lan.attic.ch>
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Use errx() instead of err() for malloc failures. -Wall. Do not dotcharnier1998-08-032-13/+14
| | | | terminate errx() string. Remove unused #includes. Use .Tn for NFS.
* Fix PR 1607, hopefully without breaking the PR 5208 fixes.peter1998-05-111-7/+7
| | | | | | | | | | | | | | | | umount() was trying to stat() the mountpoint, this would fail if the mountpoint was a NFS mountpoint, and the fallback code would try and pass a hostname:/dir path as the mountpoint to unmount(2), which would fail. This whole stat() of the name supplied on the command line business is trouble as it'll wedge on a hung NFS mount. I'm not entirely sure why we are not simply looking up both arguments in the mount table and doing the right thing without accessing the filesystem. It seems that we're going to a lot of trouble to allow mountpoints on symlinks and other wierd things. PR: 1607
* Fixed the previous fix. The original path was annulled when itbde1998-02-031-3/+4
| | | | | was a directory, so the error message for attempting to unmount an unmounted-on directory was more broken than before.
* Removed definition of _NEW_VFSCONF. The new vfsconf interface is nowbde1998-01-201-2/+0
| | | | the default.
* mount(8) only uses realpath() for the mountpoint, so don't look up thebde1998-01-191-6/+6
| | | | | | | | | | | | real path here for the mount device (or path). This fixes difficulties unmounting devices that are actually symlinks to real devices. Also, print the original path instead of the real path in early error messages. nfs path handling and later error messages may still be wrong, probably only in silly cases where the original path is both a symlink and a remote path. PR: 5208
* style(9) correctionsimp1997-12-261-1/+2
| | | | Submitted by: bde
* Be extra paranoid about trusting the length of the data returned byimp1997-12-241-1/+1
| | | | | gethostbyaddr. Submitted by: Julian Assange
* Fix a typo and while here cleanup the use of the .Nm macro.steve1997-08-201-6/+7
| | | | | PR: docs/4339 Submitted by: Matthew Hunt <mph@pobox.com>
* Sync usage string according to man page.charnier1997-06-191-4/+3
|
* Merge from Lite2.bde1997-06-163-133/+104
| | | | | | | | | | | | - use new getvfsbyname() interface. - new -A option, like -a except only mounted file systems are unmounted. All non-cosmetic FreeBSD changes in umount.c, except ignoring of realpath() failures, went away because they are done better in Lite2. realpath() failures must be ignored so that non-pathnames like "<above>:/foo" and "host:/bar" get as far as mount(2). Reviewed by: dfr
* Generalise the previous change so that only NFS hostnames are looked up.dfr1997-05-161-2/+2
| | | | | PR: bin/3588 Suggested by: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
* Don't try to look up unionfs' <above>, <below> keywords as hostnames.dfr1997-04-291-2/+2
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-291-1/+1
| | | | posix standard on the topic.
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* Fix initialization error that caused `mount -vat' to behave unexpectedlywollman1995-04-101-3/+6
| | | | | | in certain circumstances. Fixes PR #182. Submitted by: Andrew Atrens <atreand@statcan.ca>
* From njw@cs.city.ac.uk (Nick Williams):dg1994-11-042-4/+26
| | | | | | | | | | | /sbin/umount does not return the correct exit status due to incorrect logic in its internals. Further, because of the nature of the code, you *cannot* use it to umount a directory from a union mountpoint. Well, you can sometimes, it depends on if the directory is at the top of the union stack or not :) Submitted by: njw@cs.city.ac.uk (Nick Williams)
* Delete obsolete references to librpc.a.wollman1994-08-081-2/+0
|
* Convert to our man installation style. Also fixed long-standing bugwollman1994-08-051-0/+1
| | | | | in `fastboot'/`fasthalt' in which the interpreter would hang around after `reboot' or `halt' is run, causing an irritating ``Killed'' message.
* BSD 4.4 Lite sbin Sourcesrgrimes1994-05-263-0/+551
Note: XNSrouted and routed NOT imported here, they shall be imported with usr.sbin.
OpenPOWER on IntegriCloud