miniupnpd: FreeBSD uses /etc/defaults/rc.conf

fixes #24
This commit is contained in:
Thomas Bernard 2016-12-28 12:10:06 +01:00
parent 2c77721888
commit ee2f6ac2ce
2 changed files with 7 additions and 5 deletions

View File

@ -46,8 +46,8 @@ FWNAME = pf
# better way to find if we are using ipf or pf
.if $(OSNAME) == "FreeBSD"
.if exists(/etc/rc.subr) && exists(/etc/rc.conf)
FWNAME != . /etc/rc.subr; . /etc/rc.conf; \
.if exists(/etc/rc.subr) && exists(/etc/default/rc.conf)
FWNAME != . /etc/rc.subr; . /etc/default/rc.conf; \
if checkyesno ipfilter_enable; then \
echo "ipf"; elif checkyesno pf_enable; then \
echo "pf"; elif checkyesno firewall_enable; then \

View File

@ -1,5 +1,7 @@
#! /bin/sh
# $Id: genconfig.sh,v 1.90 2016/02/11 10:35:12 nanard Exp $
# vim: tabstop=4 shiftwidth=4 noexpandtab
#
# miniupnp daemon
# http://miniupnp.free.fr or http://miniupnp.tuxfamily.org/
# (c) 2006-2016 Thomas Bernard
@ -166,11 +168,11 @@ 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/rc.conf ] ; then
if [ -f /etc/rc.subr ] && [ -f /etc/default/rc.conf ] ; then
# source file with handy subroutines like checkyesno
. /etc/rc.subr
# source config file so we can probe vars
. /etc/rc.conf
. /etc/default/rc.conf
if checkyesno ipfilter_enable; then
echo "Using ipf"
FW=ipf