Mythbuntu 9.10 and RTC wakeup via ACPI

For the wakeup via ACPI to work correctly, the rtc device needs to be left alone during shutdown.
Apparently the hwclock-save service ignores the HWCLOCKACCESS setting in /etc/default/rcS

My fixed /etc/init/hwclock-save service script:


script
. /etc/default/rcS
[ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
[ "$BADYEAR" = "yes" ] && badyear="--badyear"
if [ "$HWCLOCKACCESS" != "no" ]; then
exec hwclock --rtc=/dev/rtc0 --systohc $tz --noadjfile $badyear
fi
end script