Merge "Fail build due to missing kauditd only when SELinux is enabled"

This commit is contained in:
Zuul 2018-10-11 09:46:48 +00:00 committed by Gerrit Code Review
commit bbbade0e4c
1 changed files with 2 additions and 2 deletions

View File

@ -66,8 +66,8 @@ fi
IFS='|' read -ra SPLIT_MOUNTS <<< "$DIB_MOUNTPOINTS"
for MOUNTPOINT in "${SPLIT_MOUNTS[@]}"; do
if [ "${MOUNTPOINT}" != "/tmp/in_target.d" ] && [ "${MOUNTPOINT}" != "/dev" ] && [ "${MOUNTPOINT}" != "/boot/efi" ]; then
if ! pgrep kauditd >/dev/null; then
echo "*** kauditd not found, suggesting auditing support is disabled in the host kernel. setfiles will fail without this, please enable and rebuild"
if ! [ -z ${_runcon} ] && ! pgrep kauditd >/dev/null; then
echo "*** SELinux enabled and kauditd not found, suggesting auditing support is disabled in the host kernel. setfiles will fail without this, please enable and rebuild"
exit 1
fi
sudo ${_runcon} chroot ${TARGET_ROOT} \