If using DISTDIR we need to be sure to create a ${DESTDIR}/var/db/zoneinfo

PR:		bin/162891
Submitted by:	Helge Oldach <src-mergemaster-nov11@oldach.net>
This commit is contained in:
Doug Barton 2011-11-29 08:22:12 +00:00
parent b8843fe73f
commit 878c6432be
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228122

View File

@ -1336,14 +1336,14 @@ esac
if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC
echo ''
[ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}"
if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then
echo "*** Reinstalling `cat ${DESTDIR}/var/db/zoneinfo` as ${DESTDIR}/etc/localtime"
[ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}"
tzsetup $tzs_args -r
else
echo "*** There is no ${DESTDIR}/var/db/zoneinfo file to update ${DESTDIR}/etc/localtime."
echo ' You should run tzsetup'
run_it_now tzsetup
run_it_now "tzsetup $tzs_args"
fi
fi