diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-11-06 09:56:43 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-11-06 12:23:12 +0100 |
commit | 7962e7a0b423a5dfba251622f64d3891f69a55c0 (patch) | |
tree | e16edaaec63ba1b50a3e672cb33473d0aecd7231 /defaultenv/defaultenv-2-base/bin/init | |
parent | 32e879f0a3e984ae319f8438af6ac240911a4cbf (diff) | |
download | barebox-7962e7a0b423a5dfba251622f64d3891f69a55c0.tar.gz barebox-7962e7a0b423a5dfba251622f64d3891f69a55c0.tar.xz |
defaultenv-2: Make use of nonvolatile variables
This moves the variable assignments previously done in /env/config-board
to non volatile variables in /env/nv/. This makes the settings adjustable
by the user without editing a file.
Most of the changes are simple conversions which for many boards makes
/env/config-board unnecessary. Some boards had some logic to assign
global.boot.default based on the current bootsource. This has been
moved to /env/init/bootsource. An additional check is added to not
overwrite a nv.boot.default should it exist.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv/defaultenv-2-base/bin/init')
-rw-r--r-- | defaultenv/defaultenv-2-base/bin/init | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/defaultenv/defaultenv-2-base/bin/init b/defaultenv/defaultenv-2-base/bin/init index 3a0e93b49d..34807bcf58 100644 --- a/defaultenv/defaultenv-2-base/bin/init +++ b/defaultenv/defaultenv-2-base/bin/init @@ -16,9 +16,12 @@ global editcmd [ -z "${global.hostname}" ] && global.hostname=generic [ -z "${global.user}" ] && global.user=none +magicvar -a global.user "username (used in network filenames)" [ -z "${global.autoboot_timeout}" ] && global.autoboot_timeout=3 +magicvar -a global.autoboot_timeout "timeout in seconds before automatic booting" [ -z "${global.boot.default}" ] && global.boot.default=net [ -z "${global.allow_color}" ] && global.allow_color=true +magicvar -a global.allow_color "Allow color on the console (boolean)" [ -z "${global.editcmd}" ] && global.editcmd=sedit [ -e /env/config-board ] && /env/config-board |