From 25811badce84cd157a8b66c84e78f931cad1d129 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 20 Dec 2007 12:15:26 -0600 Subject: Set hwclock *before* udev is loaded This prevents /dev/ timestamps from being 'in the future' when the hwclock is not in UTC. Closes FS#8665 Signed-off-by: Aaron Griffin --- rc.sysinit | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index 72ad615..8d045d0 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -35,6 +35,16 @@ mount -n -t sysfs none /sys /sbin/modprobe usbcore >/dev/null 2>&1 grep -qw usbfs /proc/filesystems && mount -n -t usbfs none /proc/bus/usb +# Set clock early to fix some bugs with filesystem checks +# Clock is set again later to match rc.conf +if [ -f /etc/localtime ]; then + if [ "$HARDWARECLOCK" = "UTC" ]; then + /sbin/hwclock --directisa --utc --hctosys --noadjfile + else + /sbin/hwclock --directisa --localtime --hctosys --noadjfile + fi +fi + if [ -x /sbin/udevadm -a -d /sys/block ]; then # We have udev and /sys appears to be mounted, use UDev #status "Starting UDev Daemon" /etc/start_udev init @@ -220,16 +230,6 @@ fi status "Mounting Root Read-only" /bin/mount -n -o remount,ro / -# Set clock early to fix some bugs with filesystem checks -# Clock is set again later to match rc.conf -if [ -f /etc/localtime ]; then - if [ "$HARDWARECLOCK" = "UTC" ]; then - /sbin/hwclock --directisa --utc --hctosys --noadjfile - else - /sbin/hwclock --directisa --localtime --hctosys --noadjfile - fi -fi - FORCEFSCK= [ -f /forcefsck ] && FORCEFSCK="-- -f" NETFS="nonfs,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,nousbfs,noshfs,nofuse,nofuseblk" -- cgit v1.2.3