After the installation of the /usr/share/zoneinfo, run tzsetup if

/var/db/zoneinfo exists.

MFC after:	1 week
This commit is contained in:
Edwin Groothuis 2009-10-21 20:59:12 +00:00
parent b5f58d7778
commit 38a96a6838
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198351

View File

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