Lines 1-38
Link Here
|
1 |
--- genconfig.sh.orig 2008-10-01 14:49:26.000000000 +0200 |
|
|
2 |
+++ genconfig.sh 2009-04-19 14:15:37.574904740 +0200 |
3 |
@@ -70,17 +70,24 @@ |
4 |
# new way to see which one to use PF or IPF. |
5 |
# see http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=957 |
6 |
# source file with handy subroutines like checkyesno |
7 |
- . /etc/rc.subr |
8 |
- # source config file so we can probe vars |
9 |
- . /etc/rc.conf |
10 |
- if checkyesno ipfilter_enable; then |
11 |
- echo "Using ipf" |
12 |
- FW=ipf |
13 |
- echo "#define USE_IPF 1" >> ${CONFIGFILE} |
14 |
- elif checkyesno pf_enable; then |
15 |
- echo "Using pf" |
16 |
- FW=pf |
17 |
- echo "#define USE_PF 1" >> ${CONFIGFILE} |
18 |
+ if [ -f /etc/rc.subr ] && [ -f /etc/rc.conf ]; then |
19 |
+ # source file with handy subroutines like checkyesno |
20 |
+ . /etc/rc.subr |
21 |
+ # source config file so we can probe vars |
22 |
+ . /etc/rc.conf |
23 |
+ if checkyesno ipfilter_enable; then |
24 |
+ echo "Using ipf" |
25 |
+ FW=ipf |
26 |
+ echo "#define USE_IPF 1" >> ${CONFIGFILE} |
27 |
+ elif checkyesno pf_enable; then |
28 |
+ echo "Using pf" |
29 |
+ FW=pf |
30 |
+ echo "#define USE_PF 1" >> ${CONFIGFILE} |
31 |
+ else |
32 |
+ echo "Could not detect usage of ipf or pf. Compiling for pf by default" |
33 |
+ FW=pf |
34 |
+ echo "#define USE_PF 1" >> ${CONFIGFILE} |
35 |
+ fi |
36 |
else |
37 |
echo "Could not detect usage of ipf or pf. Compiling for pf by default" |
38 |
FW=pf |