uboot-envtools: check for config prior to append
authorImran Khan <gururug@gmail.com>
Tue, 17 Dec 2019 13:59:28 +0000 (05:59 -0800)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 17 Dec 2019 17:35:16 +0000 (19:35 +0200)
commit27d69d25612e857268492678b86aa88e8ea924ac
treec273cee746c336642abeb4a0836c045bc8d1cc2c
parentf45a16dead15169f06a999f71061e66df1fc478c
uboot-envtools: check for config prior to append

In the rare event a pre-populated fw_env.config exists in the rootfs prior
to firstboot, calling fw_setenv after the system has initialised will
annihilate the devices environment due to two identical lines in
fw_env.config.

Check for existence prior to blind appendage.

Signed-off-by: Imran Khan <gururug@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: fixed patch format, improved grep, cosmetics]
package/boot/uboot-envtools/Makefile
package/boot/uboot-envtools/files/uboot-envtools.sh