dracut-module-setup.sh: setup correct system time and time zone in 2nd kernel.
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. Previously, this functionality was implemented in dracut base module: commit 77364fd Author: WANG Chao <chaowang@redhat.com> base: setup correct system time and time zone in initrd But some people complains about a normal boot initrd needs to rebuild every time if time zone is changed. So let's fix it on our side. Signed-off-by: WANG Chao <chaowang@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
12b86202b5
commit
0aee2a0072
@ -405,6 +405,7 @@ install() {
|
|||||||
if is_ssh_dump_target; then
|
if is_ssh_dump_target; then
|
||||||
dracut_install /var/lib/random-seed || exit $?
|
dracut_install /var/lib/random-seed || exit $?
|
||||||
fi
|
fi
|
||||||
|
dracut_install -o /etc/adjtime /etc/localtime
|
||||||
inst "$moddir/monitor_dd_progress" "/kdumpscripts/monitor_dd_progress"
|
inst "$moddir/monitor_dd_progress" "/kdumpscripts/monitor_dd_progress"
|
||||||
chmod +x ${initdir}/kdumpscripts/monitor_dd_progress
|
chmod +x ${initdir}/kdumpscripts/monitor_dd_progress
|
||||||
inst "/bin/dd" "/bin/dd"
|
inst "/bin/dd" "/bin/dd"
|
||||||
|
Loading…
Reference in New Issue
Block a user