[PATCH] defaultenv: don't overwrite in config

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Sat May 12 17:40:12 EDT 2012

This patch prooved to be useful while working with a colleague on a single
machine. It allows to switch the user without editing /env/config by
just issuing:

	export user=me

. Note, in bash this construct (i.e. an if without body) bails out with:

	Syntax error: "fi" unexpected

but in hush it seems to do the right thing.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
 defaultenv/config |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/defaultenv/config b/defaultenv/config
index 3e4c2ee..7b61d29 100644
--- a/defaultenv/config
+++ b/defaultenv/config
@@ -1,7 +1,9 @@
+if [ -z "$user" ]; then
+#	user=
 # Enter MAC address here if not retrieved automatically

More information about the barebox mailing list