From 5d8e3b18dc610e2696606092ba66e1477eccce88 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 14 May 2006 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.4.0-1=20-=20Updated=20'S110W'=20in=20'sourc?= =?UTF-8?q?es.conf'.=20-=20Adjusted=20the=20'runvdr'=20script=20so=20that?= =?UTF-8?q?=20the=20user=20can=20fill=20in=20the=20functions=20to=20=20=20?= =?UTF-8?q?detect,=20load=20and=20unload=20the=20necessary=20driver=20modu?= =?UTF-8?q?les=20(thanks=20to=20M.=20Kiesel=20for=20=20=20reporting=20that?= =?UTF-8?q?=20it=20still=20used=20DVBDIR).=20-=20Added=20'eval'=20to=20the?= =?UTF-8?q?=20$VDRCMD=20call=20in=20'runvdr'=20to=20avoid=20problems=20wit?= =?UTF-8?q?h=20quoting=20=20=20(suggested=20by=20Udo=20Richter).=20-=20Fix?= =?UTF-8?q?ed=20missing=20','=20in=20the=20Italian=20and=20Polish=20OSD=20?= =?UTF-8?q?texts=20(thanks=20to=20Marko=20M=C3=A4kel=C3=A4).=20-=20Updated?= =?UTF-8?q?=20the=20Czech=20OSD=20texts=20(thanks=20to=20Vladim=C3=ADr=20B?= =?UTF-8?q?=C3=A1rta).=20-=20Fixed=20handling=20the=20"Power"=20key=20in?= =?UTF-8?q?=20case=20a=20timer=20is=20about=20to=20start=20recording=20=20?= =?UTF-8?q?=20(thanks=20to=20Udo=20Richter).=20-=20Fixed=20the=20character?= =?UTF-8?q?=20'r'=20in=20fontosd=20and=20fontsml=20for=20iso8859-2=20(than?= =?UTF-8?q?ks=20to=20Vladim=C3=ADr=20=20=20B=C3=A1rta).=20-=20When=20check?= =?UTF-8?q?ing=20whether=20a=20VPS=20timer=20has=20entered=20the=20"VPS=20?= =?UTF-8?q?margin",=20the=20event's=20start=20=20=20time=20is=20now=20used?= =?UTF-8?q?=20instead=20of=20the=20timer's=20start=20time,=20because=20oth?= =?UTF-8?q?erwise=20events=20that=20=20=20start=20way=20off=20of=20their?= =?UTF-8?q?=20VPS=20time=20wouldn't=20be=20recorded=20correctly.=20-=20If?= =?UTF-8?q?=20VPS=20timers=20are=20active,=20their=20events=20are=20now=20?= =?UTF-8?q?being=20kept=20up=20to=20date=20if=20there=20=20=20are=20any=20?= =?UTF-8?q?free=20devices=20available.=20-=20Fixed=20the=20character=20#20?= =?UTF-8?q?7=20in=20fontosd=20for=20iso8859-2=20(thanks=20to=20Vladim?= =?UTF-8?q?=C3=ADr=20B=C3=A1rta).=20-=20Fixed=20handling=20unknown=20codes?= =?UTF-8?q?=20when=20learning=20LIRC=20remote=20control=20codes=20(reporte?= =?UTF-8?q?d=20=20=20by=20Helmut=20Auer).=20-=20Since=20some=20channels=20?= =?UTF-8?q?(especially=20the=20Austrian=20ORF)=20randomly=20change=20the?= =?UTF-8?q?=20ids=20of=20their=20=20=20EPG=20events,=20VDR=20now=20gives?= =?UTF-8?q?=20the=20start=20time=20precedence=20when=20searching=20for=20e?= =?UTF-8?q?xisting=20=20=20events.=20-=20Fixed=20automatically=20updating?= =?UTF-8?q?=20the=20CAM=20menu=20in=20case=20the=20whole=20operation=20(fo?= =?UTF-8?q?r=20=20=20instance=20a=20firmware=20update)=20takes=20longer=20?= =?UTF-8?q?than=20the=20menu=20timeout.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runvdr | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'runvdr') diff --git a/runvdr b/runvdr index 355549c..701c94c 100755 --- a/runvdr +++ b/runvdr @@ -5,6 +5,11 @@ # If VDR exits abnormally, the driver will be reloaded # and VDR restarted. # +# In order to actually use this script you need to implement +# the functions DriverLoaded(), LoadDriver() and UnloadDriver() +# and maybe adjust the VDRPRG and VDRCMD to your particular +# requirements. +# # Since this script loads the DVB driver, it must be started # as user 'root'. Add the option "-u username" to run VDR # under the given user name. @@ -15,27 +20,43 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: runvdr 1.16 2006/02/04 15:20:48 kls Exp $ +# $Id: runvdr 1.18 2006/05/01 14:51:00 kls Exp $ -DVBDIR="../DVB/driver" VDRPRG="./vdr" VDRCMD="$VDRPRG -w 60 $*" LSMOD="`/sbin/lsmod | grep -w '^dvb' | wc -l`" KILL="/usr/bin/killall -q -TERM" +# Detect whether the DVB driver is already loaded +# and return 0 if it *is* loaded, 1 if not: +function DriverLoaded() +{ + return 1 +} + +# Load all DVB driver modules needed for your hardware: +function LoadDriver() +{ +} + +# Unload all DVB driver modules loaded in LoadDriver(): +function UnloadDriver() +{ +} + # Load driver if it hasn't been loaded already: -if [ $LSMOD -eq 0 ] ; then - (cd $DVBDIR; make insmod) +if ! DriverLoaded; then + LoadDriver fi while (true) do - $VDRCMD + eval "$VDRCMD" if test $? -eq 0 -o $? -eq 2; then exit; fi - date - echo "restarting VDR" + echo "`date` reloading DVB driver" $KILL $VDRPRG sleep 10 - (cd $DVBDIR; make rmmod; make insmod) - date + UnloadDriver + LoadDriver + echo "`date` restarting VDR" done -- cgit v1.2.3