]> code.ossystems Code Review - openembedded-core.git/commit
initscripts: Fix populate-volatile.sh bug when file/dir exists
authorAndrei Gherzan <andrei@gherzan.ro>
Fri, 24 Jul 2020 17:12:05 +0000 (18:12 +0100)
committerSteve Sakoman <steve@sakoman.com>
Mon, 27 Jul 2020 22:19:07 +0000 (12:19 -1000)
commit471094f8afa57548e9ff3fd7a99306f58b87d478
tree758b815192e453ad15a9597f8a9365c1fba4cb9f
parent2c44581c3be7f1330f32870f9a9721a53a49f62b
initscripts: Fix populate-volatile.sh bug when file/dir exists

The blocks which test for entry exitence (file or directory) use a
`A && B || C` syntax. This form is not behaving as a if-then-else block
even the code logic assumes that. C may run when A is true which breaks
the case where VERBOSE is 'no' but the file/directory exists.

Along with fixing these specific issues, this patch fixes the other
instances where blocks of form `A && B || C` are used as if-then-else.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1b9ea22acb66554925720e04cf24100664234574)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh