Add missing aethercast setting for apparmor in Ubuntu Touch 16.04 (xenial)
#!/bin/bash -x | |
if (( $EUID != 0 )); then | |
FULLFILENAME=$(readlink -e $0) | |
sudo -i "$FULLFILENAME" | |
exit | |
fi | |
if !(grep -q "aethercast" /etc/apparmor.d/sbin.dhclient); then | |
echo "Updating /etc/apparmor.d/sbin.dhclient" | |
mount -o rw,remount / | |
cp /etc/apparmor.d/sbin.dhclient /etc/apparmor.d/sbin.dhclient.bak | |
ADDLINES=' # aethercast\n \/{,var\/}run\/aethercast\/dhclient*.leases lrw,\n\n' | |
sed -e "s/ # if there is a custom script, let it run unconfined/${ADDLINES} # if there is a custom script, let it run unconfined/" < /etc/apparmor.d/sbin.dhclient.bak > /etc/apparmor.d/sbin.dhclient | |
mount -o ro,remount / | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment