aboutsummaryrefslogtreecommitdiff
path: root/package/tzdata
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2014-05-22 22:40:59 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-05-22 23:52:18 +0200
commit5f017a8961e071ceda5350e2d12b58d969b439dd (patch)
tree6ec7e1bf8e92f241a6ba90ba5c8f72ce3ba069d5 /package/tzdata
parent5d231598c2e9bd632eecdfe4326b74e3bbc77e0c (diff)
downloadbuildroot-5f017a8961e071ceda5350e2d12b58d969b439dd.tar.gz
buildroot-5f017a8961e071ceda5350e2d12b58d969b439dd.tar.bz2
system/timezone: check localtime exists
When installing a localtime, check it is a valid timezone. [Peter: extend error message to make it clear to the user what to change] Reported-by: Sagaert Johan <sagaert.johan@skynet.be> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/tzdata')
-rw-r--r--package/tzdata/tzdata.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index a498d10c35..58b5f130e4 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -44,6 +44,11 @@ define TZDATA_INSTALL_TARGET_CMDS
ln -sfn "$${zone}" "$${zone##*/}"; \
done
if [ -n "$(TZDATA_LOCALTIME)" ]; then \
+ if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/$(TZDATA_LOCALTIME) ]; then \
+ printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \
+ "$(TZDATA_LOCALTIME)"; \
+ exit 1; \
+ fi; \
cd $(TARGET_DIR)/etc; \
ln -sf ../usr/share/zoneinfo/$(TZDATA_LOCALTIME) localtime; \
echo "$(TZDATA_LOCALTIME)" >timezone; \