On Thu, Jul 24, 2014 at 08:09:34PM +0200, Andreas Henriksson wrote: > Hello! > > A very long time ago you opened a bug report at > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505138
Wow, old bug :-) > Some comments on the proposed patch inline..... Could you maybe > answer the question about /sys/class/rtc/rtc0/wakealarm below? > > > > --- /tmp/hwclock.sh.orig 2008-11-08 14:57:29.000000000 -0800 > > +++ /etc/init.d/hwclock.sh 2008-11-08 15:04:13.000000000 -0800 > > @@ -122,6 +122,18 @@ > > # WARNING: If you disable this, any changes to the system > > # clock will not be carried across reboots. > > # > > + # Preserve an ACPI wakeup time > > + # (see http://www.mythtv.org/wiki/index.php/ACPI_Wakeup) > > (Dead link, I guess we can just drop the above row.) It seems to be at http://www.mythtv.org/wiki/ACPI_Wakeup#Disable_hwclock_updates now > > + if [ -f /sys/class/rtc/rtc0/wakealarm ]; then > > + ACPITIME_LOCATION="" > > Bug? should be set to the tested file above, right? Yes, that looks like a bug. > > + elif [ -f /proc/acpi/alarm ]; then > > + ACPITIME_LOCATION="/proc/acpi/alarm" > > + else > > + ACPITIME_LOCATION="" > > + fi > > + if [ "$ACPITIME_LOCATION" ]; then > > Isn't it better to include "-n" to test non-zero string? I think that comes down a matter of style and personal taste. > > + ACPITIME=$(cat $ACPITIME_LOCATION) > > + fi > > if [ "$HWCLOCKACCESS" != no ]; then > > log_action_msg "Saving the system clock" > > if [ "$GMT" = "-u" ]; then > > @@ -130,6 +142,9 @@ > > if /sbin/hwclock --systohc $GMT $HWCLOCKPARS $BADYEAR; then > > verbose_log_action_msg "Hardware Clock updated to `date`" > > fi > > + if [ "$ACPITIME_LOCATION" ]; then > > Ditto, Isn't it better to include "-n" to test non-zero string? As above. > > + echo "$ACPITIME" > $ACPITIME_LOCATION > > + fi > > else > > verbose_log_action_msg "Not saving System Clock" > > fi > > Regards, > Andreas Henriksson >
signature.asc
Description: Digital signature