feat: update pick to last changes.

This commit is contained in:
Alexandre Pujol 2022-09-13 12:23:58 +01:00
parent 58e060c470
commit 5f49ffeb94
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC

18
pick
View File

@ -30,10 +30,13 @@ _install_tunables() {
for path in apparmor.d/tunables/*; do for path in apparmor.d/tunables/*; do
install -Dm0644 "$path" "/etc/apparmor.d/tunables/$(basename "$path")" install -Dm0644 "$path" "/etc/apparmor.d/tunables/$(basename "$path")"
done done
if [[ "$DISTRIBUTION" != "arch" ]]; then case "$DISTRIBUTION" in
sed -i -e '/Archlinux/d' /etc/apparmor.d/tunables/extend arch)
sed -i -e '/etc/d' /etc/apparmor.d/tunables/global sed -i -e '/Debian/d' /etc/apparmor.d/tunables/extend ;;
fi debian|ubuntu|whonix)
sed -i -e '/Archlinux/d' /etc/apparmor.d/tunables/extend ;;
*) _die "$DISTRIBUTION is not a supported distribution." ;;
esac
} }
_reload_apparmor() { _reload_apparmor() {
@ -46,7 +49,12 @@ pick() {
path="$(find apparmor.d -iname "$profile" -type f -not -path './apparmor.d/tunables/*' -not -path './apparmor.d/abstractions/*')" path="$(find apparmor.d -iname "$profile" -type f -not -path './apparmor.d/tunables/*' -not -path './apparmor.d/abstractions/*')"
if [[ -f "$path" ]]; then if [[ -f "$path" ]]; then
install -Dm0644 "$path" "/etc/apparmor.d/$profile" install -Dm0644 "$path" "/etc/apparmor.d/$profile"
[[ "$COMPLAIN" == 1 ]] && _set_complain "/etc/apparmor.d/$profile" if [[ "$COMPLAIN" == 1 ]]; then
_set_complain "/etc/apparmor.d/$profile"
fi
if [[ "$DISTRIBUTION" == debian ]]; then
sed -i -e '/abi /d' "/etc/apparmor.d/$profile"
fi
fi fi
done done
} }