Skip to content

Commit fe2348a

Browse files
committedDec 18, 2024
some aa-complain improve
1 parent 7b374d1 commit fe2348a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎lnxrouter

+6-6
Original file line numberDiff line numberDiff line change
@@ -2087,8 +2087,9 @@ run_wifi_ap_processes() {
20872087
echo
20882088
echo "Starting hostapd"
20892089

2090-
if COMPLAIN_CMD=$(command -v complain || command -v aa-complain); then
2091-
$COMPLAIN_CMD hostapd
2090+
if COMPLAIN_CMD="$(command -v aa-complain || command -v complain)"; then
2091+
echo "Setting hostapd to AppArmor complain mode..."
2092+
"$COMPLAIN_CMD" hostapd
20922093
fi
20932094

20942095
# hostapd '-P' works only when use '-B' (run in background)
@@ -2108,10 +2109,9 @@ start_dnsmasq() {
21082109
echo
21092110
echo "Starting dnsmasq"
21102111

2111-
if COMPLAIN_CMD=$(command -v complain || command -v aa-complain); then
2112-
# openSUSE's apparmor does not allow dnsmasq to read files.
2113-
# remove restriction.
2114-
$COMPLAIN_CMD dnsmasq
2112+
if COMPLAIN_CMD="$(command -v aa-complain || command -v complain)"; then
2113+
echo "Setting dnsmasq to AppArmor complain mode..."
2114+
"$COMPLAIN_CMD" dnsmasq
21152115
fi
21162116

21172117
# Using '-d'(no daemon) dnsmasq will not turn into 'nobody'

0 commit comments

Comments
 (0)
Please sign in to comment.