opnsense-ports/misc/zoneinfo/pkg-install
Franco Fichtner b37d6593bc */*: sync with upstream
Taken from: FreeBSD
2016-07-22 05:22:19 +02:00

14 lines
337 B
Bash

#!/bin/sh
if [ "$2" != "PRE-INSTALL" ]; then
exit 0
fi
if [ -f /var/db/zoneinfo -a -O /var/db/zoneinfo -a -G /var/db/zoneinfo ]; then
if [ -f /usr/share/zoneinfo/$(cat /var/db/zoneinfo) ]; then
tzsetup -r
echo "/etc/localtime is updated."
fi
else
echo "Now run tzsetup(8) again to install the right file to /etc/localtime."
fi