[U-Boot-Users] Delete all env vars except read onlys

Markus Klotzbücher
2008-02-13T10:33:44Z

Stefan Roese <sr@denx.de> writes:

> On Wednesday 13 February 2008, Markus Klotzb?cher wrote:
>> > => scrubenv
>> > Do you really want to do this ('yes' or 'no')? yes
>>
>> Such a confirmation is not very Unix-like and will prevent this command
>> to be used in scripts. I like the idea of a scrubenv/resetenv command
>> but vote for leaving out the confirmation.
>>
>> U-Boot provides many, much more serious ways to blow you foot off which
>> don't ask such questions.
>
> Sure. But not by "just" typing one command. Or at least I don't know those
> kind of destructive commands.

It need not be a single one, it could be a script. For instance, I once
ran an "update" script without checking that _my_ version of U-Boot
would be used. It used some ancient version which turned the board
(temporarily) into a doorstop.

Stupid? Yes! But would such checks (e.g. to "mw") have avoided the
problem? I doubt it. Probably I'd just have typed "yes" without
checking.

BTW, after accidentally erasing the environment variables U-Boot will
(likely) still start up, so it's really not that critical, is it?

Just my 2c.

Best regards

Markus

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de