我使用Ubuntu 10.04,并在服务器启动时使用puppet将时区从UTC改为PST。 我使用的木偶时区配方是这样的: 木偶时间食谱
事情工作正常与Ubuntu 10.04,现在我们正在移动到Ubuntu 12.04和这个木偶食谱不起作用。 我想通过的原因是在10.04 / etc / localtime是一个内容为PST8PDT的文件,而在12.04是一个符号链接(由于木偶配方),它连接到SystemV /但是SystemV目录的path不正确。 当我在/ etc中执行ls -l时
lrwxrwxrwx 1 root root 18 Oct 18 18:38 localtime -> ../SystemV/PST8PDT
但是没有SystemV文件夹/ etc的一个级别。 我改变了木偶食谱:
class timezone::pacific inherits timezone { file { "/etc/localtime": require => Package["tzdata"], # source => "file:///usr/share/zoneinfo/US/Pacific", source => "file:///usr/share/zoneinfo/SystemV/PST8PDT",
它的工作和当地时间不再是一个链接。 任何人都可以请帮我理解为什么我inheritance和10.04工作得很好的傀儡配方没有在12.04工作,为什么改变配方到新的SystemV目的地修复它。
这有点奇怪。 在我的12.04 VM上, /usr/share/zoneinfo/SystemV/PST8PDT和/usr/share/zoneinfo/US/Pacific是/usr/share/zoneinfo/America/Los_Angeles的符号链接。 你使用的任何一个path都应该产生一个/etc/localtime ,这是一个到../America/Los_Angeles的链接。
你有没有考虑做一个links => follow ? 这样木偶会parsing符号链接并复制内容而不是复制符号链接。