[Buildroot] [PATCH] toolchain-external: fix potential entire root filesystem removal

Mason slash.tmp at free.fr
Fri Sep 16 10:13:14 UTC 2016


On 15/09/2016 21:20, Thomas Petazzoni wrote:

> On Thu, 15 Sep 2016 18:19:01 +0200, Arnout Vandecappelle wrote:
> 
>> I'm sure I had a reason to add the /*, but I can't remember and the commit
>> message isn't helpful. The only difference (except for keeping the directory)
>> that I can think of is that .stamp files are kept, but (a) they should be
>> removed and (b) there aren't any stamp files in that directory...
> 
> I don't really see a reason for the /*, and it seems really dangerous :)

In fact, I think "rm -rf $(var)" would fail when var is empty.
And GNU rm errors out for "rm -rf /"
I agree that $(var)/* is rarely useful.

Regards.




More information about the buildroot mailing list