Comment 2 for bug 1543025

Martin Pitt (pitti) wrote :

I think the bug is here in cloudinit/distros/

def set_etc_timezone(tz, tz_file=None, tz_conf="/etc/timezone",
    util.write_file(tz_conf, str(tz).rstrip() + "\n")
    # This ensures that the correct tz will be used for the system
    if tz_local and tz_file:
        util.copy(tz_file, tz_local)

/etc/localtime ought to be a symlink to the selected file in /usr/share/zoneinfo/, not a copy (it used to in the past due to the possibility of /usr/ being on a separate file system, but that got fixed by initramfs-tools in a better way now). So with the copy() the symlink doesn't get updated, and instead it clobbers the file in /usr/.