mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] defaultenv: don't overwrite  in config
@ 2012-05-12 21:40 Uwe Kleine-König
  2012-05-12 21:43 ` Uwe Kleine-König
  2012-05-13  9:05 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2012-05-12 21:40 UTC (permalink / raw)
  To: barebox; +Cc: Steffen Trumtrar

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>
---
 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 @@
 #!/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
-- 
1.7.10


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] defaultenv: don't overwrite  in config
  2012-05-12 21:40 [PATCH] defaultenv: don't overwrite in config Uwe Kleine-König
@ 2012-05-12 21:43 ` Uwe Kleine-König
  2012-05-13  9:05 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2012-05-12 21:43 UTC (permalink / raw)
  To: barebox; +Cc: Steffen Trumtrar

Hmm, originally I had "$user" in the Subject between the two
whitespaces. I wonder how I dropped it ...

Sascha, do you fix that up when (and if) you commit the patch please?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] defaultenv: don't overwrite  in config
  2012-05-12 21:40 [PATCH] defaultenv: don't overwrite in config Uwe Kleine-König
  2012-05-12 21:43 ` Uwe Kleine-König
@ 2012-05-13  9:05 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2012-05-13  9:05 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox, Steffen Trumtrar

On Sat, May 12, 2012 at 11:40:12PM +0200, Uwe Kleine-König wrote:
> 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>

Applied, thanks.

I hope though that the current default env will not last for very much
longer.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-13  9:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-12 21:40 [PATCH] defaultenv: don't overwrite in config Uwe Kleine-König
2012-05-12 21:43 ` Uwe Kleine-König
2012-05-13  9:05 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox