post-install 989 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copy/update time zone database to the /etc hierarchy
  2. cp -Rpf "${packagedir}/${name}"/etc/zoneinfo* etc/
  3. # Delete unneeded .nograft files under etc
  4. find etc/zoneinfo* -type f -name '.nograft' -exec rm -f {} +
  5. # Set default zone info file, default points to 'UTC'
  6. if test -r etc/zoneinfo/UTC
  7. then
  8. if test -L etc/localtime && test ! -e etc/localtime
  9. then
  10. echo "etc/localtime is a dangling symlink, trying to recreate it" 1>&2
  11. ln -sf zoneinfo/UTC etc/localtime
  12. elif test ! -e etc/localtime
  13. then
  14. ln -s zoneinfo/UTC etc/localtime
  15. fi
  16. fi
  17. if test ! -e etc/localtime
  18. then
  19. echo "Setting default time zone to UTC (etc/localtime -> zoneinfo/UTC) ..."
  20. ln -sf zoneinfo/UTC etc/localtime
  21. fi
  22. # Re-create symlink for "zoneinfo-posix" directory
  23. (
  24. rm -f etc/zoneinfo-posix
  25. cd etc && ln -sf zoneinfo zoneinfo-posix
  26. )
  27. # Make a symlink for compatibility at "usr/share"
  28. (
  29. mkdir -p usr/share
  30. cd usr/share && ln -sf /etc/zoneinfo .
  31. )