[OE-core] [PATCH] base-files: Don't export TZ if /etc/TZ exists

Ben Shelton ben.shelton at ni.com
Wed Jul 23 22:29:28 UTC 2014


From: Richard Tollerton <rich.tollerton at ni.com>

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>
---
 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
-- 
2.0.2




More information about the Openembedded-core mailing list