Hello!

A very long time ago you opened a bug report at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505138

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.)

> +         if [ -f /sys/class/rtc/rtc0/wakealarm ]; then
> +             ACPITIME_LOCATION=""

Bug? should be set to the tested file above, right?

> +         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?

> +             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?

> +                 echo "$ACPITIME" > $ACPITIME_LOCATION
> +             fi
>           else
>               verbose_log_action_msg "Not saving System Clock"
>           fi

Regards,
Andreas Henriksson


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to