From 90dc87b7de182ae1b82179a1fb1dfab38bf80bb9 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 24 Mar 2013 13:00:22 +0100 Subject: [PATCH] vdr: Small adjustments. * 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 | 5 +++++ config/vdr/runvdr | 41 +++++------------------------------ config/vdr/vdr.sysconfig | 39 +++++++++++++++++++++++++++++++++ lfs/vdr | 8 +++++++ 4 files changed, 57 insertions(+), 36 deletions(-) create mode 100644 config/vdr/vdr.sysconfig diff --git a/config/rootfiles/packages/vdr b/config/rootfiles/packages/vdr index 3bc0aad64a..4b6eaffe2e 100644 --- a/config/rootfiles/packages/vdr +++ b/config/rootfiles/packages/vdr @@ -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 diff --git a/config/vdr/runvdr b/config/vdr/runvdr index 94b117d596..5dcfd6c39d 100644 --- a/config/vdr/runvdr +++ b/config/vdr/runvdr @@ -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 index 0000000000..f4f78bb373 --- /dev/null +++ b/config/vdr/vdr.sysconfig @@ -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 069b90ea86..24eac9b7d8 100644 --- 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 -- 2.39.5