init: Add note about snapd policy and early boot to rc.apparmor.functions

Snapd now loads its own policy via its own systemd unit
https://github.com/snapcore/snapd/pull/8467

If A distro is not using snapd systemd unit then dropping snapd policy
from the apparmor unit is a breaking change, distros will either need
to use the snapd systemd unit or revert

0164fd05 init: stop loading snap policy

Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen 2020-09-22 12:18:35 -07:00
parent 0164fd05d6
commit 692f78cf3f

View file

@ -43,6 +43,9 @@ if [ -d /etc/apparmor.d ] ; then
else
aa_log_warning_msg "Unable to find profiles directory, installation problem?"
fi
# Eg. snapd policy might need this on some systems if loading policy
# during early boot if not using the snapd unit file
ADDITIONAL_PROFILE_DIR=
if [ -n "$ADDITIONAL_PROFILE_DIR" ] && [ -d "$ADDITIONAL_PROFILE_DIR" ]; then
PROFILE_DIRS="$PROFILE_DIRS $ADDITIONAL_PROFILE_DIR"