diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2012-05-12 23:40:12 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-05-13 11:06:08 +0200 |
commit | 3ba37aea2ada6c3105854e89e86a9e96d8799830 (patch) | |
tree | a22a73a8b51f519c80051e5ad5ac6c7e06d897c2 /defaultenv | |
parent | 254b18333972b31a774eb7a13ca3689cee986f93 (diff) | |
download | barebox-3ba37aea2ada6c3105854e89e86a9e96d8799830.tar.gz barebox-3ba37aea2ada6c3105854e89e86a9e96d8799830.tar.xz |
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>
Diffstat (limited to 'defaultenv')
-rw-r--r-- | defaultenv/config | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/defaultenv/config b/defaultenv/config index 3e4c2eef6c..7b61d29730 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 |