Kaynağa Gözat

Fwknopd: Set capture interface to wan by default

Jonathan Bennett 9 yıl önce
ebeveyn
işleme
a624a63150
1 değiştirilmiş dosya ile 8 ekleme ve 1 silme
  1. 8
    1
      net/fwknop/files/fwknopd.init

+ 8
- 1
net/fwknop/files/fwknopd.init Dosyayı Görüntüle

@@ -5,7 +5,7 @@
5 5
 # list of contributors, see the file 'CREDITS'.
6 6
 #
7 7
 . /lib/functions.sh
8
-START=60
8
+START=95
9 9
 
10 10
 FWKNOPD_BIN=/usr/sbin/fwknopd
11 11
 
@@ -36,6 +36,13 @@ reload()
36 36
 gen_confs()
37 37
 {
38 38
 	[ -f /tmp/access.conf.tmp ] && rm /tmp/access.conf.tmp
39
+	if [`uci get fwknopd.@access[0].PCAP_INTF` = ""]
40
+	then
41
+		. /lib/functions/network.sh
42
+		network_get_physdev device wan
43
+		uci set fwknopd.@config[0].PCAP_INTF="$device"
44
+		uci commit
45
+	fi
39 46
 	config_cb() {
40 47
 		local type="$1"
41 48
 		local name="$2"