Author: duncan
Date: Fri Feb 29 13:29:16 2008
New Revision: 10456

Log:
Replaced back quotes with $(), this is easier to see and allows nested command
Changed to allow an error message when the acpi devices are not found.


Modified:
   branches/rel-1-7/freevo/contrib/gentoo/wakeup.sh
   branches/rel-1/freevo/contrib/gentoo/wakeup.sh

Modified: branches/rel-1-7/freevo/contrib/gentoo/wakeup.sh
==============================================================================
--- branches/rel-1-7/freevo/contrib/gentoo/wakeup.sh    (original)
+++ branches/rel-1-7/freevo/contrib/gentoo/wakeup.sh    Fri Feb 29 13:29:16 2008
@@ -4,14 +4,14 @@
 
 if [[ ${CLOCK} == "UTC" ]] ; then
     hwopts="--utc"
-    offset=`date +%z`
+    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`
+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
@@ -21,7 +21,8 @@
 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
+elif [ -e /proc/acpi/alarm ]; then
     echo ${wakedate} > /proc/acpi/alarm
+else
+    echo "Cannot find acpi rtc" >&2
 fi

Modified: branches/rel-1/freevo/contrib/gentoo/wakeup.sh
==============================================================================
--- branches/rel-1/freevo/contrib/gentoo/wakeup.sh      (original)
+++ branches/rel-1/freevo/contrib/gentoo/wakeup.sh      Fri Feb 29 13:29:16 2008
@@ -4,14 +4,14 @@
 
 if [[ ${CLOCK} == "UTC" ]] ; then
     hwopts="--utc"
-    offset=`date +%z`
+    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`
+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
@@ -21,7 +21,8 @@
 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
+elif [ -e /proc/acpi/alarm ]; then
     echo ${wakedate} > /proc/acpi/alarm
+else
+    echo "Cannot find acpi rtc" >&2
 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

Reply via email to