vdr/vdr/debian README.Debian changelog vdr-shutdown vdr.default

Tobias Grimm pkg-vdr-dvb-changes@lists.alioth.debian.org
Sat, 27 Nov 2004 20:53:41 +0000


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

Modified Files:
	README.Debian changelog vdr-shutdown vdr.default 
Log Message:
some minor improvements to the shutdown routine

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/changelog,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- changelog	14 Nov 2004 10:45:35 -0000	1.63
+++ changelog	27 Nov 2004 20:53:38 -0000	1.64
@@ -1,5 +1,7 @@
 vdr (1.2.6-6) unstable; urgency=low
 
+  !!! unreleased - remove this line, when releasing this revision !!!
+
   * Thomas Günther <tom@toms-cafe.de>
     - new (optional) plugin check (with "vdr -V -P plugin")
     - Extracted patchlevel code to patchlevel.sh 
@@ -14,6 +16,10 @@
     - removed PLUGIN_ORDER_FILE paramter, order.conf should always be in
       PLUGIN_CFG_DIR
     - set default location for epg.data to /var/cache/vdr (vdr -E)
+    - The default command to shutdown the system when the power-off-key of the
+      remote is pressed, can now be configured in /etc/default/vdr.
+    - When processing the shutdown hooks, no further hook scripts will be
+      processed, if one script requests to delay the shutdown.
   * Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
     - Added german (de.po) debconf-translation from Jens Nachtigall 
       <nachtigall@web.de> (closes: #273643)

Index: vdr.default
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.default,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- vdr.default	13 Nov 2004 23:12:28 -0000	1.15
+++ vdr.default	27 Nov 2004 20:53:38 -0000	1.16
@@ -18,3 +18,8 @@
 # Options that will be passed to vdr's commandline
 # for example: OPTIONS="-w 15 --port=0"
 OPTIONS="-w 60"
+
+# VDR executes this command when the power-off-key of the remote is
+# pressed after processing all shutdown hook scripts. Shutdown hooks
+# may override this command - see /usr/share/doc/vdr/README.Debian.
+SHUTDOWNCMD="/etc/init.d/vdr stop ; sleep 1 ; /sbin/shutdown -h now"

Index: vdr-shutdown
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr-shutdown,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- vdr-shutdown	22 Oct 2004 10:30:28 -0000	1.6
+++ vdr-shutdown	27 Nov 2004 20:53:38 -0000	1.7
@@ -6,6 +6,11 @@
 # see README.Debian
 #
 
+test -f /etc/default/vdr && . /etc/default/vdr
+
+[ -z "$SHUTDOWNCMD" ] && \
+  export SHUTDOWNCMD="/etc/init.d/vdr stop ; sleep 1 ; /sbin/shutdown -h now"
+
 SHUTDOWN_HOOKS_DIR=/usr/share/vdr/shutdown-hooks/
 
 log="logger -t vdr-shutdown"
@@ -19,9 +24,6 @@
     $svdrpsend MESG "$1"
 }
 
-MAX_TRY_AGAIN=0
-SHUTDOWNCMD="/etc/init.d/vdr stop ; sleep 1 ; /sbin/shutdown -h now"
-
 shutdownhooks=`find $SHUTDOWN_HOOKS_DIR -maxdepth 1 -xtype f | sort`
 
 for shutdownhook in $shutdownhooks; do
@@ -46,19 +48,10 @@
     if [ $TRY_AGAIN -gt 0 ]
     then
 	$log "$shutdownhook requests to try again in $TRY_AGAIN minutes" 
-	if [ $MAX_TRY_AGAIN -lt $TRY_AGAIN ]
-	then
-	    MAX_TRY_AGAIN=$TRY_AGAIN
-	fi
+        echo "$svdrpsend HITK Power" | at now + $TRY_AGAIN minutes
+        osdmsg "Shutdown aborted. Retry in $TRY_AGAIN minutes." &
+        exit 0
     fi
 done 
-
-if [ $MAX_TRY_AGAIN -gt 0 ]
-then
-  $log "Will try again shutdown 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
 
 eval $SHUTDOWNCMD

Index: README.Debian
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/README.Debian,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- README.Debian	1 Aug 2004 10:41:18 -0000	1.9
+++ README.Debian	27 Nov 2004 20:53:38 -0000	1.10
@@ -143,11 +143,14 @@
 
 TRY_AGAIN=<minutes to wait before next shutdown request>
 
-To overwrite the command that will be executed to shutdown the machine after
-all shutdown hooks have been processed, the shutdown hook may write to stdout:
+In this case, no further shutdown hooks will be processed and the shutdown will
+be invoked in TRY_AGAIN minutes again.
 
-SHUTDOWNCMD=<new shutdown command>
+To overwrite the command defined in /etc/default/vdr that will be executed to
+shutdown the machine after all shutdown hooks have been processed, a shutdown
+hook may write to stdout:
 
+SHUTDOWNCMD=<new shutdown command>
 
 Optional Patches
 ----------------