summaryrefslogtreecommitdiffstats
path: root/share/zoneinfo
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2009-10-21 20:59:12 +0000
committeredwin <edwin@FreeBSD.org>2009-10-21 20:59:12 +0000
commitec50bd2dc073063cd6fdb77344b2850072ce342c (patch)
tree4084a981cf253579b699a8ca9d54e5cbf7999a2d /share/zoneinfo
parent33fed7584a5e4fa0fed3e5542dd2b3a5583d5964 (diff)
downloadFreeBSD-src-ec50bd2dc073063cd6fdb77344b2850072ce342c.zip
FreeBSD-src-ec50bd2dc073063cd6fdb77344b2850072ce342c.tar.gz
After the installation of the /usr/share/zoneinfo, run tzsetup if
/var/db/zoneinfo exists. MFC after: 1 week
Diffstat (limited to 'share/zoneinfo')
-rw-r--r--share/zoneinfo/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile
index e254277..6acd502 100644
--- a/share/zoneinfo/Makefile
+++ b/share/zoneinfo/Makefile
@@ -54,4 +54,24 @@ beforeinstall:
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
${.CURDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
+afterinstall:
+ @#
+ @# If the file /var/db/zoneinfo exists, and it is owned by root:wheel,
+ @# and the contents of it exists in /usr/share/zoneinfo, then reinstall
+ @# it.
+ @#
+ @if [ -f ${DESTDIR}/var/db/zoneinfo -a -O ${DESTDIR}/var/db/zoneinfo \
+ -a -G ${DESTDIR}/var/db/zoneinfo ]; then \
+ zf=$$(cat ${DESTDIR}/var/db/zoneinfo); \
+ if [ -f ${DESTDIR}/usr/share/zoneinfo/$${zf} ]; then \
+ if [ ! -z "${DESTDIR}" ]; then \
+ optC="-C ${DESTDIR}"; \
+ fi; \
+ echo "Updating /etc/localtime"; \
+ tzsetup ${optC} -r; \
+ fi; \
+ else \
+ echo "Run tzsetup(8) manually to update /etc/localtime."; \
+ fi
+
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud