blob: f134a306828d9df6ae14559810f3d793fc8c4931 [file] [log] [blame]
# QA checks for systemd units.
systemd_check() {
local systemddir f
# Common mistakes in systemd service files.
if type -P pkg-config >/dev/null && pkg-config --exists systemd; then
systemddir=$(pkg-config --variable=systemdsystemunitdir systemd)
else
systemddir=/usr/lib/systemd/system
fi
if [[ -d ${ED%/}${systemddir} ]]; then
f=$(grep -sH '^EnvironmentFile.*=.*/etc/conf\.d' "${ED%/}${systemddir}"/*.service)
if [[ -n ${f} ]] ; then
eqawarn "QA Notice: systemd units using /etc/conf.d detected:"
eqawarn "${f//${D}}"
eqawarn "See: https://wiki.gentoo.org/wiki/Project:Systemd/conf.d_files"
fi
fi
}
systemd_check
: # guarantee successful exit
# vim:ft=sh