some aa-complain improve

This commit is contained in:
garywill 2024-12-18 20:52:53 +08:00
parent 7b374d1ee1
commit fe2348a725
1 changed files with 6 additions and 6 deletions

View File

@ -2087,8 +2087,9 @@ run_wifi_ap_processes() {
echo echo
echo "Starting hostapd" echo "Starting hostapd"
if COMPLAIN_CMD=$(command -v complain || command -v aa-complain); then if COMPLAIN_CMD="$(command -v aa-complain || command -v complain)"; then
$COMPLAIN_CMD hostapd echo "Setting hostapd to AppArmor complain mode..."
"$COMPLAIN_CMD" hostapd
fi fi
# hostapd '-P' works only when use '-B' (run in background) # hostapd '-P' works only when use '-B' (run in background)
@ -2108,10 +2109,9 @@ start_dnsmasq() {
echo echo
echo "Starting dnsmasq" echo "Starting dnsmasq"
if COMPLAIN_CMD=$(command -v complain || command -v aa-complain); then if COMPLAIN_CMD="$(command -v aa-complain || command -v complain)"; then
# openSUSE's apparmor does not allow dnsmasq to read files. echo "Setting dnsmasq to AppArmor complain mode..."
# remove restriction. "$COMPLAIN_CMD" dnsmasq
$COMPLAIN_CMD dnsmasq
fi fi
# Using '-d'(no daemon) dnsmasq will not turn into 'nobody' # Using '-d'(no daemon) dnsmasq will not turn into 'nobody'