aboutsummaryrefslogtreecommitdiffstats
path: root/ci/check/profiles/private-etc-always-required.sh
blob: 892b15aa450fda45a93dda4f25e9fbdf7f362e97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

ALWAYS_REQUIRED=(alternatives ld.so.cache ld.so.preload)

error=0
while IFS=: read -r profile private_etc; do
	for required in "${ALWAYS_REQUIRED[@]}"; do
		if grep -q -v -E "( |,)$required(,|$)" <<<"$private_etc"; then
			printf '%s misses %s\n' "$profile" "$required" >&2
			error=1
		fi
	done
done < <(grep "^private-etc " "$@")

exit "$error"