diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2007-12-20 12:15:26 -0600 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2007-12-20 12:15:26 -0600 |
commit | 25811badce84cd157a8b66c84e78f931cad1d129 (patch) | |
tree | 5a8c1763ef9b42883d51df9b16fc81f18fd6d2e7 /rc.sysinit | |
parent | b82f9d580d1ab70e78de4c81c180c5a308bd1238 (diff) | |
download | initscripts-25811badce84cd157a8b66c84e78f931cad1d129.tar.xz |
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 <aaronmgriffin@gmail.com>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-x | rc.sysinit | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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" |