mwarning / zerotier-openwrt

A OpenWrt package for ZeroTier One - Pull requests are welcome!
697 stars 146 forks source link

Generate Secret Issue After Upgrade To 1.2.4-3 #28

Closed jalanmac closed 6 years ago

jalanmac commented 6 years ago

I had ZeroTier working fine on an ESR900 with the 1.1.4 standard version that populated OpenWrt. I am planning to put this router in a remote site so thought I would upgrade and try it out for a while. I followed your instructions and upgraded ZeroTier - everything appears to have occurred properly. I rebooted the router and noticed that my working configuration was gone - replaced by the sample again. I started to recreate the network by following your instructions on this site again but ran into a problem trying to generate the secret. I got the following output:

root@LEDE:/lib/network# zerotier.sample_config.interface='wan'
-ash: zerotier.sample_config.interface=wan: not found
root@LEDE:/lib/network# zerotier.sample_config.secret='generate'
-ash: zerotier.sample_config.secret=generate: not found
root@LEDE:/lib/network# zerotier.sample_config.join='8056c2e21c000001'
-ash: zerotier.sample_config.join=8056c2e21c000001: not found
root@LEDE:/lib/network# zerotier.lede_network=zerotier
-ash: zerotier.lede_network=zerotier: not found
root@LEDE:/lib/network# zerotier.lede_network.interface='wan'
-ash: zerotier.lede_network.interface=wan: not found
root@LEDE:/lib/network# zerotier.lede_network.join='8ad5123ed69d6f69'
-ash: zerotier.lede_network.join=8ad5123ed69d6f69: not found
root@LEDE:/lib/network# zerotier.lede_network.enabled='1'
-ash: zerotier.lede_network.enabled=1: not found
root@LEDE:/lib/network# root@LEDE:~# uci set zerotier.lede_network.secret="$(cat
/var/lib/zerotier-one/i
> dentity.secret)"
cat: can't open '/var/lib/zerotier-one/i': No such file or directory
-ash: dentity.secret: not found
-ash: root@LEDE:~#: not found
root@LEDE:/lib/network# cat: can't open '/var/lib/zerotier-one/identity.secret':
No such file or directory
> root@LEDE:~# cd ..
> root@LEDE:/# ls
> bin      etc      lib      overlay  rom      sbin     tmp      var
> dev      init     mnt      proc     root     sys      usr      www
> root@LEDE:/# cd var
> root@LEDE:/tmp# cd ..
> root@LEDE:/# cd ..
> root@LEDE:/# ls
> bin      etc      lib      overlay  rom      sbin     tmp      var
> dev      init     mnt      proc     root     sys      usr      www
> root@LEDE:/# cd lib
> root@LEDE:/lib# ls
> ar71xx.sh             libfstools.so         modules
> config                libgcc_s.so.1         netifd
> firmware              libjson_script.so     network
> functions             libsetlbf.so          preinit
> functions.sh          libubox.so            uboot-envtools.sh
> ld-musl-mips-sf.so.1  libubus.so            upgrade
> libblobmsg_json.so    libuci.so             wifi
> libc.so               libvalidate.so
> root@LEDE:/lib# cd config
> root@LEDE:/lib/config# ls
> uci.sh
> root@LEDE:/lib/config# cd ..
> root@LEDE:/lib# cd network
> root@LEDE:/lib/network# ls
> config.sh  switch.sh
> root@LEDE:/lib/network#

I am guessing that I am missing a new location and did an initial look but was unable to identify anything obvious and was hopeful that you would be able to provide the update easily..... Thanks in advance for your assistance....

mwarning commented 6 years ago

Please do uci set zerotier.sample_config.enabled=1, uci commit zerotier and start ZT with /etc/init.d/zerotier start.

Then check ZT status with "zerotier-cli status"

mwarning commented 6 years ago

This does not seem to be a ZT issue. Putting uci config lines into the command line won't work. Please open another ticket if you have more information.