1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-19 11:26:15 +02:00
openwrt-xburst/package/base-files/default/etc/nvram.sh
nbd ed5ef674d1 add copyright headers to base-files scripts and config files
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4090 3c298f89-4303-0410-b956-a3cf2f4a3e73
2006-06-27 00:36:13 +00:00

20 lines
335 B
Bash

#!/bin/ash
# Copyright (C) 2006 OpenWrt.org
# allow env to override nvram
nvram () {
if [ -x /usr/sbin/nvram ]; then
case $1 in
get) eval "echo \${$2:-\$(/usr/sbin/nvram get $2)}";;
*) /usr/sbin/nvram $*;;
esac
else
case $1 in
get) eval "echo \${$2:-\${DEFAULT_$2}}";;
*);;
esac
fi
}