| 1 |
#!/bin/sh |
| 2 |
# lxc-apparmor-load: Load AppArmor profiles, if supported by the system |
| 3 |
|
| 4 |
set -eu |
| 5 |
|
| 6 |
# don't load profiles if mount mediation is not supported |
| 7 |
SYSF=/sys/kernel/security/apparmor/features/mount/mask |
| 8 |
if [ -f $SYSF ]; then |
| 9 |
if [ -x /lib/apparmor/profile-load ]; then |
| 10 |
/lib/apparmor/profile-load usr.bin.lxc-copy |
| 11 |
/lib/apparmor/profile-load usr.bin.lxc-start |
| 12 |
/lib/apparmor/profile-load lxc-containers |
| 13 |
elif [ -x /lib/init/apparmor-profile-load ]; then |
| 14 |
/lib/init/apparmor-profile-load usr.bin.lxc-copy |
| 15 |
/lib/init/apparmor-profile-load usr.bin.lxc-start |
| 16 |
/lib/init/apparmor-profile-load lxc-containers |
| 17 |
fi |
| 18 |
fi |