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>
mkdir -p $(TARGET_DIR)/usr/share/zoneinfo/uclibc
cp -a $(@D)/output/* $(TARGET_DIR)/usr/share/zoneinfo/uclibc
if [ -n "$(TZ_LOCALTIME)" ]; then \
+ if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/uclibc/$(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/uclibc/$(TZDATA_LOCALTIME) TZ; \
fi
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; \