package: fixes for uci config and init script
This commit is contained in:
parent
f571f4b2f7
commit
ec1fea6930
@ -2,7 +2,11 @@ config wtp
|
|||||||
option country 'DE'
|
option country 'DE'
|
||||||
option location 'Magdeburg'
|
option location 'Magdeburg'
|
||||||
option name 'wtp-ap'
|
option name 'wtp-ap'
|
||||||
option ca '/etc/wtp/ca.crt'
|
option host '127.0.0.1'
|
||||||
option cert '/etc/wtp/wtp.crt'
|
# either use DTLS with ca, cert and key
|
||||||
option key '/etc/wtp/wtp.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'
|
||||||
|
@ -87,12 +87,12 @@ wtp_conf_x509() {
|
|||||||
if [ "$psk" -o "$identity" ]; then
|
if [ "$psk" -o "$identity" ]; then
|
||||||
echo " presharedkey: {"
|
echo " presharedkey: {"
|
||||||
echo " identity = \"${identity}\";"
|
echo " identity = \"${identity}\";"
|
||||||
echo " pskkey = \"123456\";"
|
echo " pskkey = \"${psk}\";"
|
||||||
echo " };"
|
echo " };"
|
||||||
fi
|
fi
|
||||||
if [ "$ca" -o "$cert" -o "$key" ]; then
|
if [ "$ca" -o "$cert" -o "$key" ]; then
|
||||||
echo " x509: {"
|
echo " x509: {"
|
||||||
echo " calist = \"$ca\";"
|
echo " calist = \"${ca}\";"
|
||||||
echo " certificate = \"${cert}\";"
|
echo " certificate = \"${cert}\";"
|
||||||
echo " privatekey = \"${key}\";"
|
echo " privatekey = \"${key}\";"
|
||||||
echo " };"
|
echo " };"
|
||||||
@ -103,6 +103,7 @@ wtp_conf_x509() {
|
|||||||
|
|
||||||
|
|
||||||
wtp_conf_wlan() {
|
wtp_conf_wlan() {
|
||||||
|
apx=0
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
wlan: {
|
wlan: {
|
||||||
prefix = "ap";
|
prefix = "ap";
|
||||||
@ -117,6 +118,7 @@ EOF
|
|||||||
else
|
else
|
||||||
mode="a"
|
mode="a"
|
||||||
fi
|
fi
|
||||||
|
[ 1 -eq $apx ] && echo ","
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
{
|
{
|
||||||
device = "${phy}";
|
device = "${phy}";
|
||||||
@ -202,6 +204,7 @@ EOF
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
apx=1
|
||||||
done
|
done
|
||||||
echo " );"
|
echo " );"
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user