linux-wifi-hotspot
linux-wifi-hotspot copied to clipboard
better apparmor detection for dnsmasq access to config file
Sorry I'm not following bug format, because it's just a simple request and I know where the problem is come from.
Some system have aa-complain
instead of complain
for AA management.
https://github.com/lakinduakash/linux-wifi-hotspot/blob/08305fb67a964d2dd6d3611b9003bf3e779eb32e/src/scripts/create_ap#L1882-L1886
My suggestions is just execute both quietly, so no if
blocks needed. It gonna failed either one of it or all of it (no AA installed) and do nothing anyway.
Inform to user if needed that AA status for dnsmasq is set to complain mode.
Something like this:
aa-complain dnsmasq > /dev/null 2>&1
aa_chk=$?
complain dnsmasq > /dev/null 2>&1
aa_chk2=$?
if [[ $aa_chk -eq 0 ]] || [[ $aa_chk2 -eq 0 ]]; then
echo "Apparmor for dnsmasq sets to complain mode. Dnsmasq needs this."
fi