vdr/nvram-wakeup/debian/patches 03_set_timer.dpatch

Tobias Grimm pkg-vdr-dvb-changes@lists.alioth.debian.org
Wed, 21 Jul 2004 17:48:04 +0000


Update of /cvsroot/pkg-vdr-dvb/vdr/nvram-wakeup/debian/patches
In directory haydn:/tmp/cvs-serv16661

Modified Files:
	03_set_timer.dpatch 
Log Message:
fixed set_timer patch

Index: 03_set_timer.dpatch
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/nvram-wakeup/debian/patches/03_set_timer.dpatch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- 03_set_timer.dpatch	8 Jul 2004 20:45:39 -0000	1.1
+++ 03_set_timer.dpatch	21 Jul 2004 17:48:02 -0000	1.2
@@ -27,62 +27,16 @@
 diff -Nur nvram-wakeup.orig/set_timer nvram-wakeup/set_timer
 --- nvram-wakeup.orig/set_timer	2003-09-18 21:45:54.000000000 +0200
 +++ nvram-wakeup/set_timer	2004-07-09 00:17:54.000000000 +0200
-@@ -19,9 +19,9 @@
- # $PATH_TO_SET_TIMER/set_timer $1 $2
- #
- # and add the following line to your start script before vdr is started
--# /usr/local/bin/set_timer
-+# /usr/sbin/set_timer
- #
--# The time command from nvram-wakeup is needed in /usr/local/bin
-+# The time command from nvram-wakeup is needed in /usr/sbin
- #
- # Thanks to Sergei Haller for nvram-wakeup and the time and ideas to develop
- # this script
-@@ -31,7 +31,7 @@
-   exit 1
- fi
+@@ -30,10 +30,10 @@
  
--if [ ! -x /usr/local/bin/time ] ; then
-+if [ ! -x /usr/sbin/time ] ; then
-   echo "$0 needs the time command from nvram-wakeup"
-   exit 1
- fi
-@@ -45,19 +45,19 @@
- # if a time_diff file exists the clock is set to the wakeup time and
- # must be corrected before any further action
- #
--if [ -f /video/time_diff ] ; then
-+if [ -f /var/tmp/time_diff ] ; then
-   
-   # the difference stored 
--  time_diff=`cat /video/time_diff`
-+  time_diff=`cat /var/tmp/time_diff`
-   
-   # add the difference to the curent time and change it in the date format
-   set_time=$(( $cur_time + $time_diff ))
--  set_date=` /usr/local/bin/time $set_time | grep "^(local" | \
-+  set_date=` /usr/sbin/time $set_time | grep "^(local" | \
-     cut -f2- -d')' `
-   
-   # correct the time and if all is right remove the time_diff file
-   # because there is no longer a difference
--  hwclock --set --date "$set_date" && hwclock --hctosys && rm /video/time_diff
-+  hwclock --set --date "$set_date" && hwclock --hctosys && rm /var/tmp/time_diff
- fi  
+ # programs to use:
+ HWCLOCK=/sbin/hwclock
+-TIME=/usr/local/sbin/time
++TIME=/usr/sbin/time
  
- # if there is a parameter given, it is assumed the system schould boot 
-@@ -87,11 +87,11 @@
-   time_diff=$(( $cur_time - $set_time ))
+ # files to use:
+-TIME_DIFF=/video/time_diff
++TIME_DIFF=/var/tmp/time_diff
  
-   # convert time to date format
--  set_date=` /usr/local/bin/time $set_time | grep "^(local" | \
-+  set_date=` /usr/sbin/time $set_time | grep "^(local" | \
-     cut -f2- -d')' `
-   
-   # set date and if it is correct write the time_diff file
-   # date --set="$set_date" && \ # add this if a script updates the hwclock 
-   hwclock --set --date "$set_date" && \
--    echo $time_diff > /video/time_diff
-+    echo $time_diff > /var/tmp/time_diff
- fi
+ 
+ if [ ! -x $HWCLOCK ] ; then