miniupnpd/Makefile: make firewall detection consistent with genconfig.sh; assume PF if /etc/rc.subr and/or /etc/rc.conf not found on *BSD
This commit is contained in:
parent
78d32ba012
commit
dcf658c55e
|
@ -45,25 +45,37 @@ FWNAME = pf
|
|||
.endif
|
||||
|
||||
# better way to find if we are using ipf or pf
|
||||
.if exists(/etc/rc.subr) && exists(/etc/rc.conf)
|
||||
.if $(OSNAME) == "FreeBSD"
|
||||
.if exists(/etc/rc.subr) && exists(/etc/rc.conf)
|
||||
FWNAME != . /etc/rc.subr; . /etc/rc.conf; \
|
||||
if checkyesno ipfilter_enable; then \
|
||||
echo "ipf"; elif checkyesno pf_enable; then \
|
||||
echo "pf"; else echo "ipfw"; fi
|
||||
echo "pf"; elif checkyesno firewall_enable; then \
|
||||
echo "ipfw"; else echo "pf"; fi
|
||||
.else
|
||||
FWNAME = pf
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if $(OSNAME) == "NetBSD"
|
||||
.if exists(/etc/rc.subr) && exists(/etc/rc.conf)
|
||||
FWNAME != . /etc/rc.subr; . /etc/rc.conf; \
|
||||
if checkyesno ipfilter; then \
|
||||
if checkyesno pf; then \
|
||||
echo "pf"; elif checkyesno ipfilter; then \
|
||||
echo "ipf"; else echo "pf"; fi
|
||||
.else
|
||||
FWNAME = pf
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if $(OSNAME) == "DragonFly"
|
||||
.if exists(/etc/rc.subr) && exists(/etc/rc.conf)
|
||||
FWNAME != . /etc/rc.subr; . /etc/rc.conf; \
|
||||
if checkyesno ipfilter; then \
|
||||
echo "ipf"; elif checkyesno pf_enable; then \
|
||||
echo "pf"; else echo "ipfw"; fi
|
||||
if checkyesno pf; then \
|
||||
echo "pf"; elif checkyesno ipfilter; then \
|
||||
echo "ipf"; else echo "pf"; fi
|
||||
.else
|
||||
FWNAME = pf
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue