base: setup correct system time and time zone in initrd
authorWANG Chao <chaowang@redhat.com>
Thu, 6 Jun 2013 09:56:11 +0000 (17:56 +0800)
committerHarald Hoyer <harald@redhat.com>
Thu, 6 Jun 2013 10:10:50 +0000 (12:10 +0200)
commit77364fd6bb01ea184db73b1a5ad05da984752293
tree3dc368934b6c4264b3efddaf7dad27e01db4c782
parent41b0e41a09ecde849a75db695db26b6ad78a1e58
base: setup correct system time and time zone in initrd

Currently in initrd, hardware clock is always considered to use UTC time
format and system time zone is also UTC. Thus system time isn't correct
if hw clock is localtime or we're using other time zone in real root.

To fix this, install /etc/adjtime and /etc/localtime to initrd. If not
using systemd, install /usr/sbin/hwclock for dracut init to setup system
time.

[harald: combined the two hostonly if's]

Signed-off-by: WANG Chao <chaowang@redhat.com>
Signed-off-by: Harald Hoyer <harald@redhat.com>
modules.d/99base/init.sh
modules.d/99base/module-setup.sh