There will be a helper for this in natty soon, but for maverick, something like above should be backported. There are no plans to move apparmor wholesale into /etc/init because blocking on it for everything would slow too much down. Instead, individual services are responsible for loading their profiles in their init scripts.
Perl? What? No, it should just use the logic all the other services do. For example:
pre-start script apparmor ] || exit 0 parser ] || exit 0 apparmor_ parser -r -W /etc/apparmor. d/usr.sbin. avahi-daemon || true
[ -d /sys/module/
[ -x /sbin/apparmor_
/sbin/
end script
There will be a helper for this in natty soon, but for maverick, something like above should be backported. There are no plans to move apparmor wholesale into /etc/init because blocking on it for everything would slow too much down. Instead, individual services are responsible for loading their profiles in their init scripts.