From b364ab51d8794e5f336fbb0ba7ee746bceac2c48 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 1 Feb 2008 22:25:07 +0000 Subject: use udev rules to set the clock, avoiding issues with modular rtcs (#290731) --- initscripts.spec | 6 +++++- rc.d/rc.sysinit | 40 ---------------------------------------- udev/rules.d/88-clock.rules | 2 ++ 3 files changed, 7 insertions(+), 41 deletions(-) create mode 100644 udev/rules.d/88-clock.rules diff --git a/initscripts.spec b/initscripts.spec index 6829bb83..9546871f 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -1,6 +1,6 @@ Summary: The inittab file and the /etc/init.d scripts Name: initscripts -Version: 8.62 +Version: 8.63 # ppp-watch is GPLv2+, everything else is GPLv2 License: GPLv2 and GPLv2+ Group: System Environment/Base @@ -212,6 +212,10 @@ rm -rf $RPM_BUILD_ROOT %ghost %attr(0664,root,utmp) /var/run/utmp %changelog +* Fri Feb 1 2008 Bill Nottingham - 8.63-1 +- don't start RAID arrays in rc.sysinit, that's done by udev (corollary of #429604) +- add a NetworkManager-dispatcher script that does netreport on interface changes + * Mon Jan 21 2008 Bill Nottingham - 8.62-1 - rc.d/rc.sysinit: fix syntax error (#429556) - migrate sr@Latn -> sr@latin () diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index a1dab044..ee0c5575 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -257,51 +257,11 @@ if [ "$PROMPT" != "no" ]; then echo fi -# Set the system clock. -update_boot_stage RCclock -ARC=0 -SRM=0 -UTC=0 - -if [ -f /etc/sysconfig/clock ]; then - . /etc/sysconfig/clock - - # convert old style clock config to new values - if [ "${CLOCKMODE}" = "GMT" ]; then - UTC=true - elif [ "${CLOCKMODE}" = "ARC" ]; then - ARC=true - fi -fi - -CLOCKDEF="" -CLOCKFLAGS="$CLOCKFLAGS --hctosys" - -case "$UTC" in - yes|true) CLOCKFLAGS="$CLOCKFLAGS --utc" - CLOCKDEF="$CLOCKDEF (utc)" ;; - no|false) CLOCKFLAGS="$CLOCKFLAGS --localtime" - CLOCKDEF="$CLOCKDEF (localtime)" ;; -esac -case "$ARC" in - yes|true) CLOCKFLAGS="$CLOCKFLAGS --arc" - CLOCKDEF="$CLOCKDEF (arc)" ;; -esac -case "$SRM" in - yes|true) CLOCKFLAGS="$CLOCKFLAGS --srm" - CLOCKDEF="$CLOCKDEF (srm)" ;; -esac - -[ -x /sbin/hwclock ] && /sbin/hwclock $CLOCKFLAGS - -action $"Setting clock $CLOCKDEF: `date`" /bin/true - # Fix console loglevel if [ -n "$LOGLEVEL" ]; then /bin/dmesg -n $LOGLEVEL fi - # Only read this once. cmdline=$(cat /proc/cmdline) diff --git a/udev/rules.d/88-clock.rules b/udev/rules.d/88-clock.rules new file mode 100644 index 00000000..18aa7a2c --- /dev/null +++ b/udev/rules.d/88-clock.rules @@ -0,0 +1,2 @@ +ACTION=="add", SUBSYSTEM=="rtc", RUN+="/sbin/hwclock --hctosys --rtc=/dev/%k" +ACTION=="add", MAJOR==10, MINOR==135, RUN+="/sbin/hwclock --hctosys --rtc=/dev/%k" -- cgit v1.2.1