From: Richard W.M. Jones Date: Wed, 10 Aug 2016 14:51:28 +0000 (+0100) Subject: init: Set clock from filesystem. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=55449e518f6a504394e4c8c9985ebcc9a033ed41;p=fedora-riscv.git init: Set clock from filesystem. There is no hardware clock in the hypervisors we are using. To ensure that the time isn't wildly wrong, set the system time to the timstamp of '/usr/bin'. --- diff --git a/init.sh b/init.sh index e7968b7..e76c1e8 100755 --- a/init.sh +++ b/init.sh @@ -15,6 +15,9 @@ mkdir -p /run/lock # Initialize dynamic linker cache. ldconfig /usr/lib64 /usr/lib /lib64 /lib +# There is no hardware clock, just ensure the date is not miles out. +date `date -r /usr/bin +%m%d%H%M%Y` + echo echo "Welcome to the Fedora/RISC-V stage3 disk image" echo "https://fedoraproject.org/wiki/Architectures/RISC-V"