From ec1fea6930b13e505b9f18e1c7f6937f873ff18b Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 23 Aug 2016 12:52:19 +0200 Subject: [PATCH] package: fixes for uci config and init script --- openwrt/freewtp/files/wtp.config | 12 ++++++++---- openwrt/freewtp/files/wtp.init | 7 +++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/openwrt/freewtp/files/wtp.config b/openwrt/freewtp/files/wtp.config index 7f73336..5b16a95 100644 --- a/openwrt/freewtp/files/wtp.config +++ b/openwrt/freewtp/files/wtp.config @@ -2,7 +2,11 @@ config wtp option country 'DE' option location 'Magdeburg' option name 'wtp-ap' - option ca '/etc/wtp/ca.crt' - option cert '/etc/wtp/wtp.crt' - option key '/etc/wtp/wtp.key' - + option host '127.0.0.1' +# either use DTLS with ca, cert and key +# option ca '/etc/wtp/ca.crt' +# option cert '/etc/wtp/wtp.crt' +# option key '/etc/wtp/wtp.key' +# or PSK +# option identity 'myname' +# option psk 'verysecret' diff --git a/openwrt/freewtp/files/wtp.init b/openwrt/freewtp/files/wtp.init index c71a2ee..79b92aa 100755 --- a/openwrt/freewtp/files/wtp.init +++ b/openwrt/freewtp/files/wtp.init @@ -87,12 +87,12 @@ wtp_conf_x509() { if [ "$psk" -o "$identity" ]; then echo " presharedkey: {" echo " identity = \"${identity}\";" - echo " pskkey = \"123456\";" + echo " pskkey = \"${psk}\";" echo " };" fi if [ "$ca" -o "$cert" -o "$key" ]; then echo " x509: {" - echo " calist = \"$ca\";" + echo " calist = \"${ca}\";" echo " certificate = \"${cert}\";" echo " privatekey = \"${key}\";" echo " };" @@ -103,6 +103,7 @@ wtp_conf_x509() { wtp_conf_wlan() { + apx=0 cat <