Bug in ftar?
Michael Tautschnig
michael.tautschnig at zt-consulting.com
Fri Oct 1 15:43:52 CEST 2004
Hi all!
I tried ftar for the first time - and it cleaned up my scripts-directory!
IMHO the following lines are very very bad:
[ $deletefiles -eq 1 ] && cd $target/$dir && rm -f .* * 2>/dev/null
[ $removedir -eq 1 ] && cd $target/$dir && rm -rf .* * 2>/dev/null
Since I didn't set -d or -r, the cd is never executed - but the rm -(r)f
is executed always! The whole bunch should probably be surrounded be an
if-clause or brackets at least!
Regards,
Michael
PS.: Of course, there is no problem when running all of that from a
ro-mounted nfs-directory :-)
More information about the linux-fai
mailing list