Commit 537b586b by Michael H. Warfield Committed by Stéphane Graber

Set timezone for new container if not previously defined.

If the container does not already contain an /etc/localtime timezone definition, then copy a definition from the host to the container. This is often a symlink to an appropriate system timezone definition files and is presumed to exist in Signed-off-by: 's avatarMichael H. Warfield <mhw@WittsEnd.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 1418dfc7
...@@ -203,6 +203,13 @@ configure_centos() ...@@ -203,6 +203,13 @@ configure_centos()
) )
fi fi
# Set default localtime to the host localtime if not set...
if [ -e /etc/localtime -a ! -e ${rootfs_path}/etc/localtime ]
then
# if /etc/localtime is a symlink, this should preserve it.
cp -a /etc/localtime ${rootfs_path}/etc/localtime
fi
# Deal with some dain bramage in the /etc/init.d/halt script. # Deal with some dain bramage in the /etc/init.d/halt script.
# Trim it and make it our own and link it in before the default # Trim it and make it our own and link it in before the default
# halt script so we can intercept it. This also preventions package # halt script so we can intercept it. This also preventions package
......
...@@ -176,6 +176,13 @@ configure_fedora() ...@@ -176,6 +176,13 @@ configure_fedora()
) )
fi fi
# Set default localtime to the host localtime if not set...
if [ -e /etc/localtime -a ! -e ${rootfs_path}/etc/localtime ]
then
# if /etc/localtime is a symlink, this should preserve it.
cp -a /etc/localtime ${rootfs_path}/etc/localtime
fi
# Deal with some dain bramage in the /etc/init.d/halt script. # Deal with some dain bramage in the /etc/init.d/halt script.
# Trim it and make it our own and link it in before the default # Trim it and make it our own and link it in before the default
# halt script so we can intercept it. This also preventions package # halt script so we can intercept it. This also preventions package
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment