r3090 - vdr/vdr/trunk/debian

Tobias Grimm tiber-guest at costa.debian.org
Tue Jun 27 17:06:28 UTC 2006


Author: tiber-guest
Date: 2006-06-27 17:06:27 +0000 (Tue, 27 Jun 2006)
New Revision: 3090

Modified:
   vdr/vdr/trunk/debian/README.Debian
   vdr/vdr/trunk/debian/changelog
   vdr/vdr/trunk/debian/config-loader.sh
   vdr/vdr/trunk/debian/vdr.init
Log:
- Added KEYB_TTY-option which may be overriden in /etc/default/vdr to make
  VDR sqitch to and acceppt input from the specified console


Modified: vdr/vdr/trunk/debian/README.Debian
===================================================================
--- vdr/vdr/trunk/debian/README.Debian	2006-06-25 21:12:55 UTC (rev 3089)
+++ vdr/vdr/trunk/debian/README.Debian	2006-06-27 17:06:27 UTC (rev 3090)
@@ -27,6 +27,13 @@
 
 The following options can be configured in /etc/default/vdr.
 
+KEYB_TTY="<CONSOLE>"
+
+    Default: "" (No console input)
+
+    Console for controlling VDR by keyboard (e.g. /dev/tty8). On startup VDR
+    will automatically switch to this console.
+
 NONPTL=<0|1>
 
     Default: 1

Modified: vdr/vdr/trunk/debian/changelog
===================================================================
--- vdr/vdr/trunk/debian/changelog	2006-06-25 21:12:55 UTC (rev 3089)
+++ vdr/vdr/trunk/debian/changelog	2006-06-27 17:06:27 UTC (rev 3090)
@@ -13,6 +13,8 @@
       VDR may take pretty long to shut down gracefully
     - Moved some of the default values in vdr.default to the config loader
       and added description to README.Debian
+    - Added KEYB_TTY-option which may be overriden in /etc/default/vdr to make
+      VDR sqitch to and acceppt input from the specified console
 
  -- Debian VDR Team <pkg-vdr-dvb-devel at lists.alioth.debian.org>  Sun, 28 May 2006 21:03:39 +0200
 

Modified: vdr/vdr/trunk/debian/config-loader.sh
===================================================================
--- vdr/vdr/trunk/debian/config-loader.sh	2006-06-25 21:12:55 UTC (rev 3089)
+++ vdr/vdr/trunk/debian/config-loader.sh	2006-06-27 17:06:27 UTC (rev 3090)
@@ -59,4 +59,8 @@
 # Set this to load only startable plugins (check with "vdr -V -P plugin")
 PLUGIN_CHECK_STARTABLE="yes"
 
+# Default Console for controlling VDR by keyboard. On startup VDR will
+# change to this console. Empty means no console input.
+KEYB_TTY=""
+
 test -f /etc/default/vdr && . /etc/default/vdr

Modified: vdr/vdr/trunk/debian/vdr.init
===================================================================
--- vdr/vdr/trunk/debian/vdr.init	2006-06-25 21:12:55 UTC (rev 3089)
+++ vdr/vdr/trunk/debian/vdr.init	2006-06-27 17:06:27 UTC (rev 3090)
@@ -23,6 +23,24 @@
 . /usr/lib/vdr/plugin-loader.sh
 . /usr/lib/vdr/commands-loader.sh
 
+clean_console()
+{
+    if [ "$KEYB_TTY" != "" ]; then
+        tput -Tlinux clear > $KEYB_TTY
+    fi
+}
+
+switch_console()
+{
+    if [ "$KEYB_TTY" != "" ]; then
+        clean_console
+        echo -e "This tty is currently mapped to VDR, keypresses aren't echoed.\r" > $KEYB_TTY
+        echo -n "For a login prompt switch to another console." > $KEYB_TTY
+        chvt `echo "$KEYB_TTY" | sed "s/\/dev\/tty//"`
+        REDIRECT="< $KEYB_TTY"
+    fi
+}
+
 startvdr()
 {
     if [ "$ENABLED" != "0" ] ; then
@@ -33,11 +51,12 @@
             getplugins
             mergecommands "commands"
             mergecommands "reccmds"
+            switch_console
             start-stop-daemon --start --quiet --startas $DAEMON --background \
                 --name $(basename $DAEMON) --pidfile $PIDFILE --make-pidfile -- \
                 -v $VIDEO_DIR -c $CFG_DIR -L $PLUGIN_DIR -r $REC_CMD \
                 -s $VDRSHUTDOWN -E $EPG_FILE -u $USER -g /tmp \
-                --port $SVDRP_PORT $OPTIONS $PLUGINS
+                --port $SVDRP_PORT $OPTIONS $PLUGINS $REDIRECT
         else
             echo -n " - seems to be running already"
         fi
@@ -53,6 +72,7 @@
     then
         start-stop-daemon --stop --retry 30 --oknodo --exec $VDRPRG-kbd >/dev/null
         rm -f $PIDFILE
+        clean_console
     else
         echo -n " - seems not to be running"
     fi




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