diff --git a/configure b/configure index cc6283751..3e76a7403 100755 --- a/configure +++ b/configure @@ -49,24 +49,34 @@ initialise() { _init remove_files - mkdir "${ROOT:?}/apparmor.d/profiles" - mv "${ROOT:?}/apparmor.d/groups/"*/* "${ROOT:?}/apparmor.d/profiles/" + echo "Ignore profiles in profiles.ignore." + while read -r profile; do + [[ "$profile" =~ ^\# ]] && continue + if [[ "$profile" == */ ]]; then + find "$ROOT/apparmor.d" -iname "${profile////}" -type d -exec rm -r {} \; + else + find "$ROOT/apparmor.d" -iname "$profile" -type f -exec rm {} \; + fi + done