Bug#499875: nvram-wakeup: REGULAR_DAYS option does not work correctly

Christoph Martin martin at uni-mainz.de
Tue Sep 23 08:33:35 UTC 2008


Package: nvram-wakeup
Version: 0.97-12
Severity: normal


The calculation of the next regular wakeup event is wrong if the
execution time of the shutdown-hook S90.nvram-wakeup is the same day
but before the REGULAR_TIME. In this case there should not be a whole days time 
added to the event. The attached patch fixes this issue.

*** /root/S90.nvram-wakeup.orig Tue Sep 23 09:21:21 2008
--- /usr/share/vdr/shutdown-hooks/S90.nvram-wakeup      Wed Sep 17 21:55:26 2008
***************
*** 44,49 ****
--- 44,52 ----
  TIMER=$1
  
  if [ $REGULAR_DAYS -gt 0 ]; then
+     if [ `date -d "$REGULAR_TIME" +%s` -gt `date +%s` ]; then
+         REGULAR_DAYS=$(($REGULAR_DAYS - 1))
+     fi
      REGULAR_TIMER=$((`date -d "$REGULAR_TIME" +%s` + $REGULAR_DAYS * 24 * 60 *
 60))
  
      # when no vdr timer is set or vdr timer starts later than regular timer:


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (998, 'stable'), (99, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-epia-1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages nvram-wakeup depends on:
ii  debconf [debconf-2.0]  1.5.11etch2       Debian configuration management sy
ii  libc6                  2.3.6.ds1-13etch7 GNU C Library: Shared libraries
ii  makedev                2.3.1-83          creates device files in /dev

nvram-wakeup recommends no packages.

-- debconf information:
  nvram-wakeup/install_instruction:
* nvram-wakeup/install_module: true





More information about the pkg-vdr-dvb-devel mailing list