Revert "base: setup correct system time and time zone in initrd"
authorHarald Hoyer <harald@redhat.com>
Wed, 31 Jul 2013 13:55:13 +0000 (15:55 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 31 Jul 2013 13:55:22 +0000 (15:55 +0200)
This reverts commit 77364fd6bb01ea184db73b1a5ad05da984752293.

Too many problems with adjtime in the initramfs

https://bugzilla.redhat.com/show_bug.cgi?id=981617

modules.d/99base/init.sh
modules.d/99base/module-setup.sh

index 0e4cac5598dd21b5c83d93efe3f7f4de8947d72b..ae73fd2caae72b50797f190debb08013ff5c9f16 100755 (executable)
@@ -48,15 +48,6 @@ if ! ismounted /dev; then
     exit 1
 fi
 
-# setup system time
-if [ -f /etc/adjtime ]; then
-    if strstr "$(cat /etc/adjtime)" LOCAL; then
-        hwclock --hctosys --localtime
-    else
-        hwclock --hctosys --utc
-    fi
-fi
-
 # prepare the /dev directory
 [ ! -h /dev/fd ] && ln -s /proc/self/fd /dev/fd >/dev/null 2>&1
 [ ! -h /dev/stdin ] && ln -s /proc/self/fd/0 /dev/stdin >/dev/null 2>&1
index c9ee838806e40f385e9772769ffa44d568db822b..842dde661a54f9611ba0bfb77a35daba3add69a2 100755 (executable)
@@ -29,17 +29,6 @@ install() {
     egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo  'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd"
     egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
 
-    # install /etc/adjtime and time zone data
-    if [[ $hostonly ]]; then
-        dracut_install -o /etc/adjtime \
-                          /etc/localtime
-
-        # Our init.sh script needs hwclock to set system time
-        if ! dracut_module_included "systemd"; then
-            dracut_install -o hwclock
-        fi
-    fi
-
     # install our scripts and hooks
     inst_script "$moddir/init.sh" "/init"
     inst_script "$moddir/initqueue.sh" "/sbin/initqueue"