Commit 357141aa authored by Stephan's avatar Stephan Committed by Sven enniK

- fix "nvram get"

  when value has an "=" "nvram get" had returned an emtpy value.
  e.g.: wireguard_secret=APZiy5Wp3G9XzHOLbREC4T3e9CrUXjwDj02QzyPsIns==
- convert wireguard_secret (if present)
parent 270eb5a5
nvram_get() { sed -n "/^$1=/{s#^.*=##;p}" /etc/nvram.conf | head -1 ; }
nvram_get() { sed -n "/^$1=/{s#^[^=]*=##;p}" /etc/nvram.conf | head -1 ; }
if [ -f /etc/nvram.conf ]; then
......@@ -25,6 +25,8 @@ if [ -f /etc/nvram.conf ]; then
uci set ffdd.sys.fastd_public="$(nvram_get fastd_public)"
uci set ffdd.sys.fastd_restrict="$(nvram_get fastd_restrict)"
uci set ffdd.sys.wireguard_secret="$(nvram_get wireguard_secret)"
uci set ffdd.sys.ssh_pwauth="$(nvram_get ssh_pwauth)"
uci set ffdd.sys.ifname="$(nvram_get ifname)"
Markdown is supported
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