openSUSE's apparmor does not allow dnsmasq to read files, remove restriction.

Fix #103
This commit is contained in:
oblique 2015-09-02 00:12:39 +03:00
parent 77ef5e992b
commit 38ebab2122

View File

@ -1645,6 +1645,13 @@ if [[ "$SHARE_METHOD" != "bridge" ]]; then
DNS_PORT=0 DNS_PORT=0
fi fi
iptables -I INPUT -p udp -m udp --dport 67 -j ACCEPT || die iptables -I INPUT -p udp -m udp --dport 67 -j ACCEPT || die
if which complain > /dev/null 2>&1; then
# openSUSE's apparmor does not allow dnsmasq to read files.
# remove restriction.
complain dnsmasq
fi
umask 0033 umask 0033
dnsmasq -C $CONFDIR/dnsmasq.conf -x $CONFDIR/dnsmasq.pid -l $CONFDIR/dnsmasq.leases -p $DNS_PORT || die dnsmasq -C $CONFDIR/dnsmasq.conf -x $CONFDIR/dnsmasq.pid -l $CONFDIR/dnsmasq.leases -p $DNS_PORT || die
umask $SCRIPT_UMASK umask $SCRIPT_UMASK