vdr/vdr/debian changelog vdr-shutdown

Tobias Grimm pkg-vdr-dvb-changes@lists.alioth.debian.org
Sat, 02 Oct 2004 18:14:33 +0000


Update of /cvsroot/pkg-vdr-dvb/vdr/vdr/debian
In directory haydn:/tmp/cvs-serv8671

Modified Files:
	changelog vdr-shutdown 
Log Message:
fixed displaying of OSD messages in shutdown script and shutdown retry code

Index: vdr-shutdown
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr-shutdown,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- vdr-shutdown	4 Jul 2004 14:15:24 -0000	1.3
+++ vdr-shutdown	2 Oct 2004 18:14:31 -0000	1.4
@@ -10,7 +10,14 @@
 
 log="logger -t vdr-shutdown"
 svdrpsend="/usr/lib/vdr/svdrpsend.pl"
-osdmsg="$svdrpsend MESG"
+
+osdmsg()
+{
+    # OSD message must be deferred, to let VDR display it AFTER the
+    # shutdown script has been executed
+    sleep 2
+    $svdrpsend MESG "$1"
+}
 
 MAX_TRY_AGAIN=0
 SHUTDOWNCMD="/etc/init.d/vdr stop ; sleep 1 ; /sbin/shutdown -h now"
@@ -31,8 +38,8 @@
     eval $result_data
     if [ $result -ne 0 ] ; then 
 	$log "Shutdown aborted by $shutdownhook with exitcode $result"
-	$osdmsg "Shutdown abgebrochen / Shutdown aborted!" &
-	[ -z $ABORT_MESSAGE ] || $osdmsg $ABORT_MESSAGE &
+	osdmsg "Shutdown abgebrochen / Shutdown aborted!" &
+	[ -z $ABORT_MESSAGE ] || osdmsg $ABORT_MESSAGE &
 	exit $result
     fi
 
@@ -49,8 +56,8 @@
 if [ $MAX_TRY_AGAIN -gt 0 ]
 then
   $log "Will try again shutdown in $MAX_TRY_AGAIN minutes."
-  echo "$svdrpsend HITK Power" | at now
-  $osdmsg "Shutdown aborted. Retry in $MAX_TRY_AGAIN minutes." &
+  echo "$svdrpsend HITK Power" | at now + $MAX_TRY_AGAIN minutes
+  osdmsg "Shutdown aborted. Retry in $MAX_TRY_AGAIN minutes." &
   exit 0
 fi
 

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/changelog,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- changelog	27 Sep 2004 15:27:25 -0000	1.48
+++ changelog	2 Oct 2004 18:14:31 -0000	1.49
@@ -7,6 +7,8 @@
     - moved PLUGIN_DIR, PLUGIN_PREFIX, CFG_DIR, PLUGIN_CFG_DIR,
       PLUGIN_ORDER_FILE, CMDHOOKSDIR, REC_CMD and SHUTDOWN_CMD from the
       default file to the init script
+    - fixed bug in shutdown script (OSD messages have to be deferred until
+      the shutdown script is finished)
   * Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
     - Added german (de.po) debconf-translation from Jens Nachtigall 
       <nachtigall@web.de> (closes: #273643)