Commit b8120af0 authored by Bjoern Franke's avatar Bjoern Franke
Browse files

fastdreg: ugly hack: add temporarily to /etc/hosts

parent 3dd5a34c
......@@ -10,9 +10,15 @@ pubkey=$(/etc/init.d/fastd show_key mesh_vpn)
regdone=$(uci get fastdreg.ffnw.regdone)
if [ "$regdone" -ne "1" ]; then
cp /etc/hosts /etc/hosts.tmp
echo "" >> /etc/hosts
reg=$(wget -T15 "$keysrv/reg.php?name=$hostname&key=$pubkey" -O -)
if [ "$reg" == "regdone" ]; then
uci set fastdreg.ffnw.regdone=1
uci commit
rm /etc/hosts
mv /etc/hosts.tmp /etc/hosts
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment