]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jul 2020 09:37:53 +0000 (10:37 +0100)
commit1b9ea22acb66554925720e04cf24100664234574
treede35450830c5ae8a5b0abba412041710ffd1d8cc
parent0a128a238f63d52aa82f8c63ee2f84ab528b3346
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>
meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh