After the installation of the /usr/share/zoneinfo, run tzsetup if
/var/db/zoneinfo exists. MFC after: 1 week
This commit is contained in:
parent
33fed7584a
commit
ec50bd2dc0
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user