Fbsd8 <fb...@a1poweruser.com> writes:

> So the question remains, why is mtree giving a return of zero when it
> finds directories on the target that are not in the spec file?

Okay, I had a hard time figuring out your examples, but I think I've got
an independent repeatable test case for the problem.

================================================================
mkdir etc home
mtree -c -d > ../out
mtree -d < ../out
echo $?
mkdir home/temp
mtree -d < ../out
echo $?
sed -i ""  's/^\(home[ ]*\)\(.*\)$/\1ignore/' ../out
mtree -d < ../out
echo $?
================================================================
The results are:
================================================================
5045] (lowell-desk) temp> mkdir etc home
[5046] (lowell-desk) temp> mtree -c -d > ../out
[5047] (lowell-desk) temp> mtree -d < ../out
[5048] (lowell-desk) temp> echo $?
0
[5049] (lowell-desk) temp> mkdir home/temp
[5050] (lowell-desk) temp> mtree -d < ../out
home/temp extra
[5051] (lowell-desk) temp> echo $?
0
[5052] (lowell-desk) temp> sed -i ""  's/^\(home[ ]*\)\(.*\)$/\1ignore/' ../out
[5053] (lowell-desk) temp> mtree -d < ../out
[5054] (lowell-desk) temp> echo $?
0
================================================================

and I think the problem you're having is that the second "echo $?"
should be 2, although the others are correct at 0. Is that correct? 

One difference from your example is that you're using '-u'. I'm not sure
why you're doing that, but it doesn't affect the bug.

Yours,
      Lowell
-- 
http://be-well.ilk.org/~lowell/
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to