mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Adjusted the 'runvdr' script so that the user can fill in the functions to detect, load and unload the necessary driver modules
This commit is contained in:
parent
57207a3d72
commit
87f7e826a1
@ -1894,3 +1894,6 @@ Werner F
|
|||||||
Dominique Simon <d.simon@gmx.net>
|
Dominique Simon <d.simon@gmx.net>
|
||||||
for reporting a bug in handling the "Power" key in case a recording is going on and
|
for reporting a bug in handling the "Power" key in case a recording is going on and
|
||||||
no plugin is active
|
no plugin is active
|
||||||
|
|
||||||
|
M. Kiesel <vdr@continuity.cjb.net>
|
||||||
|
for reporting that the 'runvdr' script still used DVBDIR
|
||||||
|
3
HISTORY
3
HISTORY
@ -4691,3 +4691,6 @@ Video Disk Recorder Revision History
|
|||||||
2006-05-01: Version 1.4.0-1
|
2006-05-01: Version 1.4.0-1
|
||||||
|
|
||||||
- Updated 'S110W' in 'sources.conf'.
|
- Updated 'S110W' in 'sources.conf'.
|
||||||
|
- Adjusted the 'runvdr' script so that the user can fill in the functions to
|
||||||
|
detect, load and unload the necessary driver modules (thanks to M. Kiesel for
|
||||||
|
reporting that it still used DVBDIR).
|
||||||
|
3
INSTALL
3
INSTALL
@ -133,6 +133,9 @@ call to the VDR program, be sure to NOT use the '-d' option! Otherwise
|
|||||||
VDR will go into 'daemon' mode and the initial program call will return
|
VDR will go into 'daemon' mode and the initial program call will return
|
||||||
immediately! 'runvdr' needs to be started as user 'root'. Use the '-u'
|
immediately! 'runvdr' needs to be started as user 'root'. Use the '-u'
|
||||||
option to run the actual 'vdr' program under a different user id.
|
option to run the actual 'vdr' program under a different user id.
|
||||||
|
Note that the 'runvdr' script needs to be adjusted to your particular
|
||||||
|
requirements before you can actually use it. See the comments inside
|
||||||
|
the script for more information.
|
||||||
|
|
||||||
Setting the system time:
|
Setting the system time:
|
||||||
------------------------
|
------------------------
|
||||||
|
37
runvdr
37
runvdr
@ -5,6 +5,11 @@
|
|||||||
# If VDR exits abnormally, the driver will be reloaded
|
# If VDR exits abnormally, the driver will be reloaded
|
||||||
# and VDR restarted.
|
# 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
|
# Since this script loads the DVB driver, it must be started
|
||||||
# as user 'root'. Add the option "-u username" to run VDR
|
# as user 'root'. Add the option "-u username" to run VDR
|
||||||
# under the given user name.
|
# under the given user name.
|
||||||
@ -15,27 +20,43 @@
|
|||||||
# See the main source file 'vdr.c' for copyright information and
|
# See the main source file 'vdr.c' for copyright information and
|
||||||
# how to reach the author.
|
# how to reach the author.
|
||||||
#
|
#
|
||||||
# $Id: runvdr 1.16 2006/02/04 15:20:48 kls Exp $
|
# $Id: runvdr 1.17 2006/05/01 13:33:31 kls Exp $
|
||||||
|
|
||||||
DVBDIR="../DVB/driver"
|
|
||||||
VDRPRG="./vdr"
|
VDRPRG="./vdr"
|
||||||
VDRCMD="$VDRPRG -w 60 $*"
|
VDRCMD="$VDRPRG -w 60 $*"
|
||||||
|
|
||||||
LSMOD="`/sbin/lsmod | grep -w '^dvb' | wc -l`"
|
LSMOD="`/sbin/lsmod | grep -w '^dvb' | wc -l`"
|
||||||
KILL="/usr/bin/killall -q -TERM"
|
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:
|
# Load driver if it hasn't been loaded already:
|
||||||
if [ $LSMOD -eq 0 ] ; then
|
if ! DriverLoaded; then
|
||||||
(cd $DVBDIR; make insmod)
|
LoadDriver
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while (true) do
|
while (true) do
|
||||||
$VDRCMD
|
$VDRCMD
|
||||||
if test $? -eq 0 -o $? -eq 2; then exit; fi
|
if test $? -eq 0 -o $? -eq 2; then exit; fi
|
||||||
date
|
echo "`date` reloading DVB driver"
|
||||||
echo "restarting VDR"
|
|
||||||
$KILL $VDRPRG
|
$KILL $VDRPRG
|
||||||
sleep 10
|
sleep 10
|
||||||
(cd $DVBDIR; make rmmod; make insmod)
|
UnloadDriver
|
||||||
date
|
LoadDriver
|
||||||
|
echo "`date` restarting VDR"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user