diff options
| author | jason.lau <Haitao.Liu@windriver.com> | 2026-04-28 17:19:42 +0800 |
|---|---|---|
| committer | Scott Murray <scott.murray@konsulko.com> | 2026-05-17 17:45:41 +0300 |
| commit | 9d749026dd1054104a946565710152b50c6330ea (patch) | |
| tree | 9c6b26c9f862552869470cd4e31a1535a4fb9c32 /recipes-ids/aide | |
| parent | b4c43ad77ad7eedab05d48dcbd32e4ef96b21c83 (diff) | |
| download | meta-security-9d749026dd1054104a946565710152b50c6330ea.tar.gz | |
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>
Diffstat (limited to 'recipes-ids/aide')
| -rw-r--r-- | recipes-ids/aide/aide_0.19.3.bb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes-ids/aide/aide_0.19.3.bb b/recipes-ids/aide/aide_0.19.3.bb index 9a94ce2..68e3bfa 100644 --- a/recipes-ids/aide/aide_0.19.3.bb +++ b/recipes-ids/aide/aide_0.19.3.bb | |||
| @@ -62,10 +62,10 @@ CONF_FILE = "${sysconfdir}/aide.conf" | |||
| 62 | FILES:${PN} += "${libdir}/${PN} ${sysconfdir}/aide.conf" | 62 | FILES:${PN} += "${libdir}/${PN} ${sysconfdir}/aide.conf" |
| 63 | 63 | ||
| 64 | pkg_postinst_ontarget:${PN} () { | 64 | pkg_postinst_ontarget:${PN} () { |
| 65 | if [ ${AIDE_SCAN_POSTINIT} ]; then | 65 | if [ "${AIDE_SCAN_POSTINIT}" = "1" ]; then |
| 66 | ${bindir}/aide -i | 66 | ${bindir}/aide -i |
| 67 | fi | 67 | fi |
| 68 | if [ ${AIDE_RESCAN_POSTINIT} && -e ${libdir}/aide/aide.db.gz ]; then | 68 | if [ "${AIDE_RESCAN_POSTINIT}" = "1" ] && [ -e ${libdir}/aide/aide.db.gz ]; then |
| 69 | ${bindir}/aide -C | 69 | ${bindir}/aide -C |
| 70 | fi | 70 | fi |
| 71 | } | 71 | } |
