summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2012-05-12 23:40:12 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-05-13 11:06:08 +0200
commit3ba37aea2ada6c3105854e89e86a9e96d8799830 (patch)
treea22a73a8b51f519c80051e5ad5ac6c7e06d897c2
parent254b18333972b31a774eb7a13ca3689cee986f93 (diff)
downloadbarebox-3ba37aea2ada6c3105854e89e86a9e96d8799830.tar.gz
defaultenv: don't overwrite $user in config
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@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--defaultenv/config4
1 files changed, 3 insertions, 1 deletions
diff --git a/defaultenv/config b/defaultenv/config
index 3e4c2ee..7b61d29 100644
--- a/defaultenv/config
+++ b/defaultenv/config
@@ -1,7 +1,9 @@
#!/bin/sh
hostname=FIXME
-#user=
+if [ -z "$user" ]; then
+# user=
+fi
# Enter MAC address here if not retrieved automatically
#eth0.ethaddr=de:ad:be:ef:00:00