]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
vdr: Small adjustments.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 24 Mar 2013 12:00:22 +0000 (13:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Apr 2013 11:53:33 +0000 (13:53 +0200)
* Make links for config.h and device.h to easily build plugins
  outside the VDR source tree.
* Add vdr configuration file.
* Remove some unused stuff from runvdr script.

config/rootfiles/packages/vdr
config/vdr/runvdr
config/vdr/vdr.sysconfig [new file with mode: 0644]
lfs/vdr

index 3bc0aad64a037d8f1c357b7dc8fab939cfb49dd1..4b6eaffe2e8ebb174ae8b86c4940b40ea93304f7 100644 (file)
@@ -2,6 +2,7 @@ etc/rc.d/init.d/vdr
 etc/rc.d/rc0.d/K40vdr
 etc/rc.d/rc3.d/S60vdr
 etc/rc.d/rc6.d/K40vdr
+etc/sysconfig/vdr
 #etc/sysconfig/vdr-plugins.d
 etc/vdr
 etc/vdr/channels.conf
@@ -71,6 +72,10 @@ usr/bin/svdrpsend
 #usr/include/vdr/tools.h
 #usr/include/vdr/transfer.h
 #usr/include/vdr/videodir.h
+#usr/lib/vdr
+#usr/lib/vdr/Make.global
+#usr/lib/vdr/config.h
+#usr/lib/vdr/device.h
 usr/sbin/runvdr
 usr/sbin/vdr
 usr/share/vdr
index 94b117d596f8ee5e687dc5222093274c5c6156aa..5dcfd6c39d4c890b9fd52b529a613a968d90c9d1 100644 (file)
@@ -65,45 +65,14 @@ reload_dvb()
     fi
 }
 
-set_rtcwake()
-{
-    # Check timestamp set by shutdown script.
-    local nexttimer=$( cat /var/run/vdr/next-timer 2>/dev/null )
-    rm -f /var/run/vdr/next-timer
-
-    if [[ $nexttimer != +([0-9]) ]] ; then
-        # Next timer timestamp not set by shutdown script or bogus,
-        # try to get it via SVDRP.
-        nexttimer=$( svdrpsend NEXT abs 2>/dev/null | \
-            sed -rne 's/^250[[:space:]]+[0-9]+[[:space:]]+([0-9]+).*/\1/p' )
-    fi
-
-    if [[ $nexttimer && $nexttimer -gt $( date +%s ) ]] ; then
-        [[ -f /etc/sysconfig/vdr ]] && . /etc/sysconfig/vdr
-        local when=$(( $nexttimer - ${WAKEUP_BEFORE_RECORDING:-10} * 60 ))
-        local hrwhen=$( date -d "1970-01-01 $when sec UTC" )
-        log "Setting wakeup time for next recording: $hrwhen"
-        /usr/sbin/rtcwake -m no -t $when >/dev/null
-    fi
-}
-
-if [[ $1 == --set-wakeup ]] ; then
-    # Just set RTC wakeup for next timer event.
-    set_rtcwake
-    exit $?
-fi
-
 rc=
 while true ; do
-
     VDR_OPTIONS=()
-    if [[ $VDR_INIT ]] ; then
-        [[ -f /etc/sysconfig/vdr ]] && . /etc/sysconfig/vdr
-        [[ $DAEMON_COREFILE_LIMIT ]] && \
-            ulimit -S -c $DAEMON_COREFILE_LIMIT &>/dev/null && \
-            VDR_OPTIONS+=( --userdump ) && cd ${TMPDIR:-/tmp}
-        build_cmdline
-    fi
+    [[ -f /etc/sysconfig/vdr ]] && . /etc/sysconfig/vdr
+    [[ $DAEMON_COREFILE_LIMIT ]] && \
+        ulimit -S -c $DAEMON_COREFILE_LIMIT &>/dev/null && \
+        VDR_OPTIONS+=( --userdump ) && cd ${TMPDIR:-/tmp}
+    build_cmdline
 
     $VDR "$@" "${VDR_OPTIONS[@]}"
     rc=$?
diff --git a/config/vdr/vdr.sysconfig b/config/vdr/vdr.sysconfig
new file mode 100644 (file)
index 0000000..f4f78bb
--- /dev/null
@@ -0,0 +1,39 @@
+# System configuration for VDR                                       -*- sh -*-
+
+# The "master" options.  Some examples of options you may want to set
+# here are -r, -t, and --rcu.  See the vdr(1) man page for more info.
+#
+VDR_OPTIONS=(--vfat)
+
+# VDR_PLUGIN_ORDER is a space separated list of plugins that should be
+# loaded in a specific order.  This affects eg. the order the plugins'
+# menu entries are displayed OSD menus by default.  The plugins in this
+# list don't need to be installed, but if they are, they will be loaded
+# before other possibly installed plugins.  Note that it is recommended
+# to load output plugins before others so that all necessary features are
+# present when needed by other plugins at startup/shutdown.
+#
+VDR_PLUGIN_ORDER="
+streamdev-server
+epgsearch
+vnsiserver
+"
+
+# PATH where to find the internally used executables.
+#
+PATH="/usr/lib/vdr/bin:$PATH"
+
+# How many minutes before a recording should the VDR box wake up?
+# Some CI/CAM combinations can take quite a long time to initialize, so
+# we default to a pretty generous value here.
+#
+WAKEUP_BEFORE_RECORDING=10
+
+# Try reloading DVB modules on unexpected exits?
+#
+#RELOAD_DVB=yes
+
+# For debugging: allow vdr to dump core.  Note that depending on the operating
+# environment, core dumps from setuid processes may be a security issue.
+#
+#DAEMON_COREFILE_LIMIT="unlimited"
diff --git a/lfs/vdr b/lfs/vdr
index 069b90ea86f5a8806385f4a185873df8b795b8fa..24eac9b7d8630bfb799e0b091ba96d3f68e86de2 100644 (file)
--- a/lfs/vdr
+++ b/lfs/vdr
@@ -116,8 +116,16 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # Install configuration.
        mkdir -pv /etc/vdr
        mkdir -pv /etc/sysconfig/vdr-plugins.d
+       cd $(DIR_APP) && install -m 644 $(DIR_SRC)/config/vdr/vdr.sysconfig \
+               /etc/sysconfig/vdr
        cd $(DIR_APP) && install -m 644 *.conf /etc/vdr
 
+       # Link development files.
+       mkdir -pv /usr/lib/vdr
+       cd $(DIR_APP) && cp -vf Make.global /usr/lib/vdr
+       ln -svf ../../include/vdr/config.h /usr/lib/vdr/config.h
+       ln -svf ../../include/vdr/device.h /usr/lib/vdr/device.h
+
        # Install start links and backup include file.
        ln -sf ../init.d/vdr /etc/rc.d/rc3.d/S60vdr
        ln -sf ../init.d/vdr /etc/rc.d/rc0.d/K40vdr