Last active
August 29, 2015 14:01
-
-
Save marxjohnson/c440a9f79dce73a0ac5f to your computer and use it in GitHub Desktop.
/etc/init/hwclock-save.conf for Ubuntu 12.04 with ACPI Wakealarm enabled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hwclock-save - save system clock to hardware clock | |
# | |
# This task saves the time from the system clock back to the hardware | |
# clock on shutdown. | |
description "save system clock to hardware clock" | |
start on runlevel [06] | |
task | |
script | |
. /etc/default/rcS | |
[ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime" | |
[ "$BADYEAR" = "yes" ] && badyear="--badyear" | |
ACPITIME=`cat /sys/class/rtc/rtc0/wakealarm` | |
exec hwclock --rtc=/dev/rtc0 --systohc $tz --noadjfile $badyear | |
echo $ACPITIME > /sys/class/rtc/rtc0/wakealarm | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment