mirror of
https://git.yoctoproject.org/meta-security
synced 2026-05-31 00:40:19 +00:00
aide: fix pkg_postinst_ontarget shell script
- Fix conditional checks for AIDE_SCAN_POSTINIT and AIDE_RESCAN_POSTINIT: '[ 0 ]' always evaluates to true since it's a non-empty string. Use string comparison '= "1"' instead. - Fix invalid use of '&&' inside '[ ]' test brackets. Use separate test expressions joined by shell '&&'. Signed-off-by: Haitao Liu <haitao.liu@windriver.com> (reworked for 0.19.3, fixed indentation) Signed-off-by: Scott Murray <scott.murray@konsulko.com>
This commit is contained in:
@@ -62,10 +62,10 @@ CONF_FILE = "${sysconfdir}/aide.conf"
|
||||
FILES:${PN} += "${libdir}/${PN} ${sysconfdir}/aide.conf"
|
||||
|
||||
pkg_postinst_ontarget:${PN} () {
|
||||
if [ ${AIDE_SCAN_POSTINIT} ]; then
|
||||
if [ "${AIDE_SCAN_POSTINIT}" = "1" ]; then
|
||||
${bindir}/aide -i
|
||||
fi
|
||||
if [ ${AIDE_RESCAN_POSTINIT} && -e ${libdir}/aide/aide.db.gz ]; then
|
||||
if [ "${AIDE_RESCAN_POSTINIT}" = "1" ] && [ -e ${libdir}/aide/aide.db.gz ]; then
|
||||
${bindir}/aide -C
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user