mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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=$?
|
||||
|
||||
39
config/vdr/vdr.sysconfig
Normal file
39
config/vdr/vdr.sysconfig
Normal file
@@ -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"
|
||||
8
lfs/vdr
8
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
|
||||
|
||||
Reference in New Issue
Block a user