Author: duncan
Date: Fri Feb 1 14:24:35 2008
New Revision: 10318
Log:
[ 1884611 ] Relatevely universal acpi wakeup script for Gentoo
New wake up script from George Kibardin added
Added:
branches/rel-1/freevo/contrib/gentoo/wakeup.sh (contents, props changed)
Added: branches/rel-1/freevo/contrib/gentoo/wakeup.sh
==============================================================================
--- (empty file)
+++ branches/rel-1/freevo/contrib/gentoo/wakeup.sh Fri Feb 1 14:24:35 2008
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+source /etc/conf.d/clock
+
+if [[ ${CLOCK} == "UTC" ]] ; then
+ hwopts="--utc"
+ offset=`date +%z`
+else
+ hwopts="--localtime"
+ offset="+0000"
+fi
+
+wakedate=`date -u -d "$1 ${offset}" "+%F %H:%M:%S"`
+wakesecs=`date -d "$1 ${offset}" +%s`
+
+#uncomment this line if you MB resets alarms
+#when hardware clock is updated on shutdown
+#and you had to disable it in /etc/conf.d/clock
+#hwclock --systohc ${hwopts} >& /dev/null
+
+if [ -e /sys/class/rtc/rtc0/wakealarm ]; then
+ echo 0 > /sys/class/rtc/rtc0/wakealarm
+ echo ${wakesecs} > /sys/class/rtc/rtc0/wakealarm
+fi
+if [ -e /proc/acpi/alarm ]; then
+ echo ${wakedate} > /proc/acpi/alarm
+fi
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog