Commit Graph

18 Commits

Author SHA1 Message Date
ache
4de572eae8 Re-add -P option (for POSIX-like command line interface) 2000-09-25 16:24:22 +00:00
ache
d58c3debc9 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
imp
054be419e8 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
35aeef29b5 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
sheldonh
542bea8cf0 Correct the usage() message as per rev 1.25 of mtree.8 . 2000-07-17 11:00:55 +00:00
ache
88c6f513f1 Fix getopt string I forget 2000-07-16 08:22:38 +00:00
ache
cf90e1b595 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
joe
58dad7500c 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
joe
dad66a4f4f 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
wollman
198f09c649 Give mtree the ability to exclude files and directories from its traversal.
PR:		16944
2000-05-12 03:03:00 +00:00
peter
efabb9ccb1 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
peter
00b7e773c5 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
charnier
c8ef4a7a48 Use err(3) instead of local redefinition. 1997-10-01 06:30:02 +00:00
ache
dcc0838048 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
imp
691010efad 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
rgrimes
162fb0a314 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
rgrimes
b98c90be2e 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
rgrimes
862fdf11a2 BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00