Hello community, here is the log from the commit of package aaa_base for openSUSE:Factory checked in at Sat Apr 18 13:50:49 CEST 2009. -------- --- aaa_base/aaa_base.changes 2009-04-16 12:55:03.000000000 +0200 +++ /mounts/work_src_done/STABLE/aaa_base/aaa_base.changes 2009-04-17 19:03:19.012480618 +0200 @@ -1,0 +2,8 @@ +Fri Apr 17 18:58:53 CEST 2009 - werner@suse.de + +- boot.clock: write system time only back to HW clock if kernel + time status shows that clocks are unsynchronized +- Add two helper scripts for mkinitrd to add and load rtc_cmos + module and add /etc/localtime to initrd (bnc#492921) + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aaa_base.spec ++++++ --- /var/tmp/diff_new_pack.C10377/_old 2009-04-18 13:50:07.000000000 +0200 +++ /var/tmp/diff_new_pack.C10377/_new 2009-04-18 13:50:07.000000000 +0200 @@ -28,7 +28,7 @@ PreReq: /usr/bin/sed /usr/bin/grep /bin/mv /bin/cat /bin/ls /bin/date /usr/bin/cmp /bin/fillup /sbin/insserv udev net-tools AutoReqProv: on Version: 11.2 -Release: 19 +Release: 20 Summary: SUSE Linux Base Package BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: aaa_base.tar.bz2 @@ -139,6 +139,11 @@ %defattr(-,root,root) %changelog +* Fri Apr 17 2009 werner@suse.de +- boot.clock: write system time only back to HW clock if kernel + time status shows that clocks are unsynchronized +- Add two helper scripts for mkinitrd to add and load rtc_cmos + module and add /etc/localtime to initrd (bnc#492921) * Thu Apr 16 2009 werner@suse.de - Make boot.clock more tough due udev timings (bnc#492921) - Remove /etc/adjtime in boot.clock if left over (bnc#495417) ++++++ aaa_base.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/aaa_base/etc/init.d/boot.clock new/aaa_base/etc/init.d/boot.clock --- old/aaa_base/etc/init.d/boot.clock 2009-04-16 15:12:34.000000000 +0200 +++ new/aaa_base/etc/init.d/boot.clock 2009-04-17 19:20:09.000000000 +0200 @@ -41,11 +41,12 @@ # # Get current status of kernel time variables, if kernel -# is within "11 minute mode" do not adjust +# is within "11 minute mode" do not adjust HW clock nor +# write system time back to HW clock, bug bnc#492921. # -SKIP_HCTOSYS=no +ELEVENMIN_MODE=no typeset -i status=$(adjtimex --print | sed -rn '/^[[:space:]]*status:/{ s/.*([0-9]+)/\1/p; }') -test $((status & 64)) -eq 0 && SKIP_HCTOSYS=yes +test $((status & 65)) -eq 1 && ELEVENMIN_MODE=yes # # Without having rtc_cmos module loaded hwclock will fail on at least x86 @@ -93,17 +94,15 @@ # mkinitrd will set this variable if the system time was older than # the mkinitrd.rpm build time. if test -n "$SYSTEM_TIME_INCORRECT" ; then - echo -n "The system time was incorrect: '$SYSTEM_TIME_INCORRECT'" + echo -n "The system time was incorrect: '${warn}$SYSTEM_TIME_INCORRECT${norm}'" rc_status -s rc_exit fi - if test "$SKIP_HCTOSYS" = yes ; then - echo -n "The System Time is already in sync with Hardware Clock" - rc_status -u + if test "$ELEVENMIN_MODE" = yes ; then + echo "The System Time is in sync with Hardware Clock ${stat}${done}good${norm}" + rc_status rc_exit fi - # Set and adjust the hardware clock - # if test "$USE_HWCLOCK" != yes ; then echo -n Setting up the System Clock @@ -142,53 +141,53 @@ rc_status fi - rc_status -v -r - else - echo -n "Set System Time to the current Hardware Clock" + rc_status -v + rc_exit + fi + # + # Set and adjust the hardware clock + # + echo -n "Set System Time to the current Hardware Clock" + # + # Read out to hardware clock and for UTC calculate adjtime + # write back the system time later at reboot/shutdown time. + # + if test "$USE_ADJFILE" = yes ; then # - # Read out to hardware clock and for UTC calculate adjtime - # write back the system time later at reboot/shutdown time. + # For UTC calculate adjtime # - if test "$USE_ADJFILE" = yes ; then - # - # For UTC calculate adjtime - # - if test ! -s /etc/adjtime ; then - echo "0.0 0 0.0" > /etc/adjtime - echo "0" >> /etc/adjtime - echo "UTC" >> /etc/adjtime - fi - rtc_rule /sbin/hwclock --adjust --hctosys $HWCLOCK - else - # - # Remove any /etc/adjtime left over - # - if test -e /etc/adjtime ; then - rm -f /etc/adjtime - fi - rtc_rule /sbin/hwclock --noadjfile --hctosys $HWCLOCK - fi - rc_status -v -r + if test ! -s /etc/adjtime ; then + echo "0.0 0 0.0" + echo "0" + echo "UTC" + fi > /etc/adjtime + rtc_rule /sbin/hwclock --hctosys $HWCLOCK --adjust + else + # Remove any /etc/adjtime left over + test -e /etc/adjtime && rm -f /etc/adjtime + rtc_rule /sbin/hwclock --hctosys $HWCLOCK --noadjfile fi + rc_status -v ;; stop) + if test "$ELEVENMIN_MODE" = yes ; then + echo "The System Time is in sync with Hardware Clock ${stat}${done}good${norm}" + rc_status + rc_exit + fi if test "$USE_HWCLOCK" = yes -a "$SYSTOHC" = yes ; then echo -n "Set Hardware Clock to the current System Time" # - # Remove any /etc/adjtime left over - # - if test "$USE_ADJFILE" = no -a -e /etc/adjtime ; then - rm -f /etc/adjtime - fi + # Write system time back to hardware clock # - # Write back system time to hardware clock - # - if test "$USE_ADJFILE" = no -o "$SKIP_HCTOSYS" = yes ; then - /sbin/hwclock --noadjfile --systohc $HWCLOCK + if test "$USE_ADJFILE" = yes ; then + /sbin/hwclock --systohc $HWCLOCK else - /sbin/hwclock --systohc $HWCLOCK + # Remove any /etc/adjtime left over + test -e /etc/adjtime && rm -f /etc/adjtime + /sbin/hwclock --systohc $HWCLOCK --noadjfile fi - rc_status -v -r + rc_status -v fi ;; status) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/aaa_base/etc/init.d/rc new/aaa_base/etc/init.d/rc --- old/aaa_base/etc/init.d/rc 2009-02-16 13:03:03.000000000 +0100 +++ new/aaa_base/etc/init.d/rc 2009-04-17 18:52:22.000000000 +0200 @@ -85,7 +85,7 @@ # Changing from single user mode into runlevel mode # For cold boot run all run boot otherwise start udev # - if "$RUNLEVEL" != "0" -a "$RUNLEVEL" != "6" ; then + if test "$RUNLEVEL" != "0" -a "$RUNLEVEL" != "6" ; then if test "$COLD_BOOT" = "yes" ; then # This is the case if we're up from cold boot echo "Sending all processes the TERM signal..." diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/aaa_base/lib/mkinitrd/scripts/boot-rtc.sh new/aaa_base/lib/mkinitrd/scripts/boot-rtc.sh --- old/aaa_base/lib/mkinitrd/scripts/boot-rtc.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/aaa_base/lib/mkinitrd/scripts/boot-rtc.sh 2009-04-17 18:51:14.000000000 +0200 @@ -0,0 +1,28 @@ +#!/bin/bash +# +#%stage: boot +#%depends: start +#%modules: rtc_cmos +#%provides: rtc +#%programs: /bin/date /bin/ln /bin/mknod /sbin/modprobe /bin/usleep +#%dontshow + +if test -n "$(modprobe -C /dev/null --ignore-install --show-depends rtc_cmos 2>/dev/null)" -a ! -e /sys/class/rtc/rtc0 +then + load_modules + typeset -i rtccount=300 + while ((rtccount-- > 0)) ; do + test -e /sys/class/rtc/rtc0 && break + usleep 10000 + done + unset rtccount + if test ! -e /dev/rtc0 ; then + mknod -m 0644 /dev/rtc0 c 250 0 + ln -sf rtc0 /dev/rtc + fi + if test -e /etc/localtime + then + echo -n 'System time: ' + date --rfc-822 + fi +fi diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/aaa_base/lib/mkinitrd/scripts/setup-rtc.sh new/aaa_base/lib/mkinitrd/scripts/setup-rtc.sh --- old/aaa_base/lib/mkinitrd/scripts/setup-rtc.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/aaa_base/lib/mkinitrd/scripts/setup-rtc.sh 2009-04-17 18:55:25.000000000 +0200 @@ -0,0 +1,14 @@ +#!/bin/bash +#%stage: boot +#%depends: prepare + +if test -e /etc/localtime +then + mkdir -m 0755 -p $tmp_mnt/etc + cp -p /etc/localtime $tmp_mnt/etc/ +fi +if test -e /usr/share/zoneinfo/UTC +then + mkdir -m 0755 -p $tmp_mnt/usr/share/zoneinfo + cp -p /usr/share/zoneinfo/UTC $tmp_mnt/usr/share/zoneinfo/ +fi ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org