I'm trying to read an export'd system environmental variable in a .lua page. It doesn't seem to be actually doing anything though.
if os.getenv("SHIELD_MODE") == "Router" then
doesn't do what it's supposed to do (namely, replace a single tab with 2 tabs)
On the device, an export -p
gives:
oot@OpenWrt:/usr/lib/lua/luci# export -p
export FIRSTBOOT='1'
export HOME='/root'
export OLDPWD='/usr/lib/lua/luci/sys'
export PATH='/usr/sbin:/usr/bin:/sbin:/bin'
export PWD='/usr/lib/lua/luci'
export SHIELD_MODE='Router'
export SHLVL='3'
export TERM='linux'
export numcores='2'
export serial
I'm new and unwise in the Lua ways, so any instruction would be most appreciated!