2 # Copy/update time zone database to the /etc hierarchy
4 cp -Rpf "${packagedir}/${name}"/etc/zoneinfo* etc/
6 # Delete unneeded .nograft files under etc
7 find etc/zoneinfo* -type f -name '.nograft' -exec rm -f {} +
9 # Set default zone info file, default points to 'UTC'
11 if test -r etc/zoneinfo/UTC
13 if test -L etc/localtime && test ! -e etc/localtime
15 echo "etc/localtime is a dangling symlink, trying to recreate it" 1>&2
16 ln -sf zoneinfo/UTC etc/localtime
17 elif test ! -e etc/localtime
19 ln -s zoneinfo/UTC etc/localtime
23 if test ! -e etc/localtime
25 echo "Setting default time zone to UTC (etc/localtime -> zoneinfo/UTC) ..."
26 ln -sf zoneinfo/UTC etc/localtime
29 # Re-create symlink for "zoneinfo-posix" directory
32 rm -f etc/zoneinfo-posix
33 cd etc && ln -sf zoneinfo zoneinfo-posix
36 # Make a symlink for compatibility at "usr/share"
40 cd usr/share && ln -sf /etc/zoneinfo .