diff options
author | Felix Fietkau <nbd@openwrt.org> | 2005-07-21 14:02:53 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2005-07-21 14:02:53 +0000 |
commit | 29a4b712e8658f13bf6f836943ec81d7cbcd3b73 (patch) | |
tree | 57b8983b840371a9290d4ead137ab9ea8f457c5f /openwrt/package/base-files/default/etc/functions.sh | |
parent | 26854133f64778924b1f1974487bade7dbce8194 (diff) | |
download | mtk-20170518-29a4b712e8658f13bf6f836943ec81d7cbcd3b73.zip mtk-20170518-29a4b712e8658f13bf6f836943ec81d7cbcd3b73.tar.gz mtk-20170518-29a4b712e8658f13bf6f836943ec81d7cbcd3b73.tar.bz2 |
add config file /etc/config/network, add board-specific network.overrides (instead of nvram.overrides)
SVN-Revision: 1519
Diffstat (limited to 'openwrt/package/base-files/default/etc/functions.sh')
-rwxr-xr-x | openwrt/package/base-files/default/etc/functions.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index 60d6231..14f5011 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -4,12 +4,18 @@ alias debug=${DEBUG:-:} # allow env to override nvram nvram () { - case $1 in - get) eval "echo \${NVRAM_$2:-\$(command nvram get $2)}";; - *) command nvram $*;; - esac + if [ -x /usr/sbin/nvram ]; then + case $1 in + get) eval "echo \${$2:-\$(command nvram get $2)}";; + *) command nvram $*;; + esac + else + case $1 in + get) eval "echo \${$2:-\${DEFAULT_$2}}";; + *);; + esac + fi } -. /etc/nvram.overrides # valid interface? if_valid () ( |