diff options
author | green <green@FreeBSD.org> | 2000-01-15 14:28:14 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2000-01-15 14:28:14 +0000 |
commit | 89bb6f8da797959859b9c1e6a63a13fcb605cbff (patch) | |
tree | e59e9577611907f18b7fb76d531a5861828c0472 /usr.sbin/rpc.umntall/rpc.umntall.c | |
parent | 9512a77f53b82d5fe0e9990a9d422d16defebac4 (diff) | |
download | FreeBSD-src-89bb6f8da797959859b9c1e6a63a13fcb605cbff.zip FreeBSD-src-89bb6f8da797959859b9c1e6a63a13fcb605cbff.tar.gz |
This is another in Martin Blapp's N-series of mount-related cleanups :)
Changes are:
- rpc.umntall is called at the right places now in /etc/rc*
- rpc.umntall timeout has been lowered from two days (too high) to one
- verbose messages in rpc.umntall have been clarified
- kill double entries in /var/db/mounttab when rpc.umntall is invoked
- ${early_nfs_mounts} has been removed from /etc/rc
- patched mount(8) -p to print different pass/dump values for ufs filesystems.
(last patch recieved from dan <bugg@bugg.strangled.net>)
Submitted by: Martin Blapp <mbr@imp.ch>, dan <bugg@bugg.strangled.net>
Diffstat (limited to 'usr.sbin/rpc.umntall/rpc.umntall.c')
-rw-r--r-- | usr.sbin/rpc.umntall/rpc.umntall.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/rpc.umntall/rpc.umntall.c b/usr.sbin/rpc.umntall/rpc.umntall.c index 11f07ec..c59c776 100644 --- a/usr.sbin/rpc.umntall/rpc.umntall.c +++ b/usr.sbin/rpc.umntall/rpc.umntall.c @@ -96,9 +96,9 @@ main(int argc, char **argv) { signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); - /* Default expiretime is two days */ + /* Default expiretime is one day */ if (expire == 0) - expire = 172800; + expire = 86400; /* * Read PATH_MOUNTTAB and check each entry * and do finally the unmounts. @@ -106,7 +106,7 @@ main(int argc, char **argv) { if (host == NULL && path == NULL) { if (!read_mtab(mtab)) { if (verbose) - warnx("nothing to do, remove %s", + warnx("nothing to do, %s does not exist", PATH_MOUNTTAB); } for (mtab = mtabhead; mtab != NULL; mtab = mtab->mtab_next) { @@ -115,12 +115,13 @@ main(int argc, char **argv) { if (keep && is_mounted(mtab->mtab_host, mtab->mtab_dirp)) { if (verbose) { - warnx("skipping entry %s:%s", + warnx("skip entry %s:%s", mtab->mtab_host, mtab->mtab_dirp); } } else if (do_umount(mtab->mtab_host, - mtab->mtab_dirp)) { + mtab->mtab_dirp) || + mtab->mtab_time <= (time(now) - expire)) { clean_mtab(mtab->mtab_host, mtab->mtab_dirp); } |