Commit Graph

18 Commits

Author SHA1 Message Date
Andrey A. Chernov
86ab37762e Re-add -P option (for POSIX-like command line interface) 2000-09-25 16:24:22 +00:00
Andrey A. Chernov
837eb85217 Restore standard symlink default, return -L, remove -P, add missing -q to getopt
This is part of whole subsystem fixing

Reviewed by:	imp
2000-09-15 08:05:37 +00:00
Warner Losh
c96eb6d2e8 Add -q. this will cause the warning messages about missing
directories to not be printed.  This is from OpenBSD (and I think
NetBSD also) and makes our mtree more compatible with other BSDs.
This makes cross compilation easier than it was before.  Other changes
will be needed to allow NetBSD or OpenBSD to cross build on FreeBSD,
but this is a start.

Reviewed by: andrey
Obtained from: OpenBSD
Concentric Red Circles by: My own stupidity
2000-07-25 19:05:09 +00:00
Marcel Moolenaar
3adc8b3d1d Revert the reversion of the default mtree behaviour. The mtree
command now follows symlinks again.

Requested by: jkh
2000-07-24 02:57:27 +00:00
Sheldon Hearn
e492a4c41a Correct the usage() message as per rev 1.25 of mtree.8 . 2000-07-17 11:00:55 +00:00
Andrey A. Chernov
25718fe3f0 Fix getopt string I forget 2000-07-16 08:22:38 +00:00
Andrey A. Chernov
1896f37452 Revert back to original mtree default behaviour to not follow symlinks, to be
compatible with other *BSD camp.  Add -L option to follow symlinks, so remove
-P option which is now default. The next step will be to add -L to building
process.

Asked-by: 	bde
2000-07-16 07:55:07 +00:00
Josef Karthauser
701cbbb5f6 Use -P instead of -S to specify that no symlinks should be followed.
There's no reason to make it different from cp(1), chmod(1), chown(1)
etc.

Requested by:	sheldonh
2000-07-14 09:37:59 +00:00
Josef Karthauser
0f4a1f9b5c Added a flag (-S) to mtree to specify that symlinks shouldn't be
followed.  This allows type=link matches to work properly and match
the link itself, instead of the file/directory that the link is
pointing to.
2000-07-13 22:13:42 +00:00
Garrett Wollman
dc785636aa Give mtree the ability to exclude files and directories from its traversal.
PR:		16944
2000-05-12 03:03:00 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Peter Wemm
7840cfdd8b Create a new flag, "nochange", which will specify that a directory is
to be created if it's missing, otherwise completely ignore it's modes and
owners.  Primary intended targets:  /usr/src and /usr/obj.

Adjust the 'not created: File exists' message to mention that it's a
directory that's the problem, otherwise it doesn't make sense.

I had created chown-style  -L and -P flag to control logical/physical mode
(ie: whether symlinks were followed), but the nochange flag is enough to
get the blasted thing out of my hair so I took them back out.
1998-06-05 14:43:42 +00:00
Philippe Charnier
de1ef5eb94 Use err(3) instead of local redefinition. 1997-10-01 06:30:02 +00:00
Andrey A. Chernov
7e03040bc0 Change FTS_PHYSICAL (not follow symlinks but return them)
to FTS_LOGICAL (follow symlinks and return their targets)

Because
1) In the real system there is a lot of symlinks nowdays over
/var, /spool, etc. Mtree can't do anything for them, i.e. change
permissions/owner. I.e. if you have /var/mail -> /somewhere
it will never be changed to group "mail" 775 like -current does now,
symlink totally confuses mtree.

2) Mtree can't deal with symlinks properly in any case (they are created
separately in other places now), so we lost no functionality by making
them invisible for mtree.
1997-05-15 08:46:57 +00:00
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Rodney W. Grimes
4ac2ef542b Add -U option which does the same things as -u except exits with 0
instead of 2 on MISMATCH.
1994-10-09 20:28:31 +00:00
Rodney W. Grimes
10c4c64eb7 1. Remove commented out CFLAGS+=-DDEBUG from Makefile
2.  Clean up code so it compiles -Wall (except for sccsid's and copyright).
    This included fixing several printf formats that where not correct,
    and changing the data types of a few things.

3.  Implement new option -i that produces indented mtree output files.

4.  Implement new option -n that turns off directory comments.

5.  Only emit /set records if something has changed since the last one.
1994-09-18 21:17:40 +00:00
Rodney W. Grimes
dea673e932 BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00