Commit 3985e3be authored by Stephan's avatar Stephan

- 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 96150fee
Pipeline #1058 passed with stage
in 15 minutes and 30 seconds
#!/bin/sh
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