Make sure the apparmor profiles and manifests end up in the custom directory, not in the rootfs

ubuntu/yakkety
Steve Langasek 10 years ago
parent 138465c476
commit b423980cd5

@ -11,3 +11,18 @@ echo "I: precompiling deb apparmor policies"
echo "I: precompiling custom click apparmor policies" echo "I: precompiling custom click apparmor policies"
mkdir -p /custom/cache/apparmor mkdir -p /custom/cache/apparmor
/sbin/apparmor_parser -M ${FEATURES} -Q --write-cache --cache-loc=/custom/cache/apparmor/ `find /var/lib/apparmor/profiles/ -maxdepth 1 -type f -not -path '*/\.*'` /sbin/apparmor_parser -M ${FEATURES} -Q --write-cache --cache-loc=/custom/cache/apparmor/ `find /var/lib/apparmor/profiles/ -maxdepth 1 -type f -not -path '*/\.*'`
#get the apparmor manifests and profiles
mkdir -p /custom/lib/apparmor/clicks
mkdir -p /custom/lib/apparmor/profiles
for manifest in /var/lib/apparmor/clicks/*; do
case $(readlink -f $manifest) in
/custom/*)
mv $manifest /custom/lib/apparmor/clicks/$manifest
profile=$(basename $manifest .json)
mv /var/lib/apparmor/profiles/click_$profile /custom/lib/apparmor/profiles
;;
esac
done

Loading…
Cancel
Save