[oe-commits] Richard Tollerton : base-files: Don't export TZ if /etc/TZ exists

git at git.openembedded.org git at git.openembedded.org
Fri Jul 25 14:34:30 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: a69c3ba99be1502c50d3d1eb9ff66f135884ed76
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=a69c3ba99be1502c50d3d1eb9ff66f135884ed76

Author: Richard Tollerton <rich.tollerton at ni.com>
Date:   Wed Jul 23 17:29:28 2014 -0500

base-files: Don't export TZ if /etc/TZ exists

While glibc/eglibc looks for the time zone in /etc/localtime, other libc
alternatives (e.g. uclibc) may look for it in /etc/TZ.  If /etc/TZ
exists, don't fall back to setting TZ to "UTC" in /etc/profile.

Signed-off-by: Richard Tollerton <rich.tollerton at ni.com>
Signed-off-by: Ben Shelton <ben.shelton at ni.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-core/base-files/base-files/profile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index 8eeaac3..0b2d9d7 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -5,7 +5,7 @@ PATH="/usr/local/bin:/usr/bin:/bin"
 EDITOR="/bin/vi"			# needed for packages like cron
 test -z "$TERM" && TERM="vt100"	# Basic terminal capab. For screen etc.
 
-if [ ! -e /etc/localtime ]; then
+if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
 	TZ="UTC"		# Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html 
 				# for an explanation of how to set this to your local timezone.
 	export TZ



More information about the Openembedded-commits mailing list