miniupnpd: fix FreeBSD Firewall detection

fixes #431
This commit is contained in:
Thomas Bernard 2020-03-29 10:54:26 +02:00
parent 05e09f9e6d
commit 5e11ef3245
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
1 changed files with 7 additions and 4 deletions

View File

@ -4,7 +4,7 @@
#
# miniupnp daemon
# http://miniupnp.free.fr or https://miniupnp.tuxfamily.org/
# (c) 2006-2019 Thomas Bernard
# (c) 2006-2020 Thomas Bernard
# This software is subject to the conditions detailed in the
# LICENCE file provided within the distribution
@ -113,7 +113,7 @@ ${RM} ${CONFIGFILE}
echo "/* MiniUPnP Project" >> ${CONFIGFILE}
echo " * http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/" >> ${CONFIGFILE}
echo " * (c) 2006-2019 Thomas Bernard" >> ${CONFIGFILE}
echo " * (c) 2006-2020 Thomas Bernard" >> ${CONFIGFILE}
echo " * generated by $0 on `date`" >> ${CONFIGFILE}
echo " * `uname -a`" >> ${CONFIGFILE}
if [ -z "$*" ] ; then
@ -198,11 +198,14 @@ case $OS_NAME in
HAVE_IP_MREQN=1
# new way to see which one to use PF or IPF.
# see http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=957
if [ -f /etc/rc.subr ] && [ -f /etc/default/rc.conf ] ; then
if [ -f /etc/rc.subr ] && [ -f /etc/defaults/rc.conf ] ; then
# source file with handy subroutines like checkyesno
. /etc/rc.subr
# source config file so we can probe vars
. /etc/default/rc.conf
. /etc/defaults/rc.conf
if [ -f /etc/rc.conf ] ; then
. /etc/rc.conf
fi
if checkyesno ipfilter_enable; then
echo "Using ipf"
FW=ipf