mirror of
https://git.yoctoproject.org/meta-security
synced 2026-01-11 15:00:34 +00:00
systemd: fix empty file list with sed
If measured-uki support is not enabled or build is continuing from previous stages, then the matching file list can be empty. Fixes build failure where sed says no input files. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
committed by
Armin Kuster
parent
5b6ea2a099
commit
4082afb8a9
@@ -11,7 +11,10 @@ PACKAGECONFIG:append = " \
|
||||
# TODO: use swtpm-native to calculate TPM measurements
|
||||
do_install:append() {
|
||||
if "${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', 'true', 'false', d)}"; then
|
||||
FILES=$( grep -rl ^ConditionSecurity=measured-uki ${D} || true )
|
||||
if [ "$FILES" != "" ]; then
|
||||
sed -i -e "s/^ConditionSecurity=measured-uki/ConditionSecurity=tpm2/g" \
|
||||
$( grep -rl ^ConditionSecurity=measured-uki ${D} )
|
||||
$FILES
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user