Runvdr ohne DVB-Treiber starten

  • Hallo,


    kann mir jemand bezüglich der Runvdr helfen? Ich möchte die Teile entfernt haben, die für das starten des DVB Treiber zuständig sind.


    Hintergrund ist, dass ich auf einem anderen PC auch VDR installiert habe und mittels Xine dort nun Fernsehen möchte, ohne DVB-Hardware.


    Hier meine Runvdr:


    #!/bin/sh
    #
    # sample runvdr script


    DESC="Digital Videorecorder"
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    CONF=/usr/local/src/VDRtmp/vdr.conf


    . $CONF


    VERSION=`grep -s 'define VDRVERSION' $MYPATH/VDR/config.h | cut -f 2 -d '"'`
    test "$VERSION" || exit 0


    VDRPRG=$MYPATH/VDR/vdr
    test -x $VDRPRG || exit 0


    getconfig()
    {
    config=`grep =\" $CONF | sed -e 's/=.*//' -e '/^#/d'`


    for i in $config ; do
    eval x=\$$i
    if (echo $i | egrep -q _) ; then
    VDROPT=$VDROPT" --`echo "${i##*\_}" | tr A-Z a-z`='$x'"
    fi
    export $i="$x"
    done
    }


    getplugins()
    {
    unset PLUGINS ordered_plugins[@] plugins[@]


    plugins=( `find $VDR_LIB -name "libvdr-*.so.$VERSION" -printf '%f ' 2>&- | sed "s/libvdr-\([^\.]\+\)\.so\.$VERSION/\1/g"` )
    ordered=( `grep -vs ^# $VDR_CONFIG/order.conf` )
    plugins=( "${plugins[@]}" )


    for i in ${ordered[@]} ; do
    for (( line=0 ; line<${#plugins[@]} ; line++ )) ; do
    if [ "$i" = "${plugins[$line]}" ] ; then
    ordered_plugins=( "${ordered_plugins[@]}" "${plugins[$line]}" )
    unset plugins[$line]
    plugins=( "${plugins[@]}" )
    break
    fi
    done
    done


    for i in ${ordered_plugins[@]} ${plugins[@]} ; do
    n=`grep -s "^$i " $VDR_CONFIG/plugins.conf`
    if [ "$n" ] ; then
    PLUGINS=$PLUGINS" -P'$n'"
    else
    PLUGINS=$PLUGINS" -P$i"
    fi
    done
    }


    getcommands()
    {
    cd $VDR_CONFIG


    find ${VDR_LIB%s*} -name "libvdr-*.so.$VERSION" -printf '%f\n' 2>&- \
    | sed "s/^libvdr-\(..*\)\.so\.$VERSION$/\1/" | sort \
    | awk '{ printf "%-40s%-0s\n" ," |--- "$1,": export LABEL=\""$1"\" ; eval $SET_PLUGINS" }' >commands[2].conf


    if ls commands[*\].conf >/dev/null 2>&1 ; then
    cat `ls commands[*\].conf` >commands.conf
    fi
    }


    modules()
    {
    case $1 in
    m*) echo "Starting DVB:" ;;
    *) echo "Shutting down DVB:" ;;
    esac
    OLD=$IFS
    IFS=$'\t'$'\n'
    for i in $MODULES ; do
    IFS=$OLD
    $1 $i >/dev/null 2>&1
    status=$?
    case $status in
    0) echo "[done] $i" ;;
    1) echo "[failed] $i" ;;
    esac
    IFS=$'\t'$'\n'
    done
    IFS=$OLD
    }


    driver()
    {
    IVMOD=`lsmod | grep -w '^ivtv' | wc -l`
    if [ -x $MYPATH/ivtv/utils/runivtv -a $IVMOD -eq 0 ] ; then
    sh $MYPATH/ivtv/utils/runivtv
    fi


    LSMOD=`lsmod | grep -w '^dvb' | wc -l`
    if [ $LSMOD -eq 0 ] ; then
    if cd $MYPATH/DVB/build-2.$(uname -r | sed -e 's/^2\.\(.\).*/\1/') 2>/dev/null ; then
    # = 1.1.1
    ./insmod.sh load
    else
    # = 1.0.1
    #cd $MYPATH/DVB/driver ; make insmod
    modules modprobe
    fi
    if [ "$SSTIME" -ne 0 ] ; then
    echo "Load still image:"
    test_stillimage $STILLIMAGE
    fi
    fi
    }


    loadlirc()
    {
    LIRCD=`ps -e | grep -w 'lircd' | wc -l`
    if [ $LIRCD -eq 0 ] ; then
    lircd &
    fi


    IREXEC=`ps -e | grep -w 'irexec' | wc -l`
    if [ $IREXEC -eq 0 ] ; then
    irexec -d $VDR_CONFIG/setup/etc/lircrc.sample
    fi
    }


    setplugins()
    {
    export SET_PLUGINS="
    REAL=\`find ${VDR_LIB%s*} -name \"libvdr-\$LABEL\.so.$VERSION\" -printf '%f\n' 2>&-\` ;
    if (echo "$RULES" | egrep -q \"\[\$LABEL\]\") ;
    then
    echo \"Error plugin \$LABEL is secure !\" ;
    elif [ -h $VDR_LIB/\$REAL ] ;
    then
    if (rm -f $VDR_LIB/\$REAL) ;
    then
    echo \"\$LABEL = off\" ;
    fi ;
    else
    if (ln -s ${VDR_LIB%s*}/\$REAL $VDR_LIB/\$REAL) ;
    then
    echo \"\$LABEL = on\" ;
    fi ;
    fi"
    }


    getconfig
    driver
    #loadlirc
    setplugins
    getcommands


    while (true) ; do


    CHAN=$(tail -n 300 $SYSLOG | grep 'switching to channel' | tail -n 1 | awk -F channel '{ print $2 }' | tr -d ' ')
    if [ -n "${CHAN##*[^0-9,-]*}" -a -e $VDR_CONFIG/setup.conf ] ; then
    if [ "$(grep ^CurrendChannel $VDR_CONFIG/setup.conf | awk -F = '{ print $2 }' | tr -d ' ')" != "$CHAN" ] ; then
    echo "Edit last channel: `grep -v ^: $VDR_CONFIG/channels.conf | head -n $CHAN | tail -n 1 | cut -f 1 -d :` ..."
    sed -i "s/^CurrentChannel = .*$/CurrentChannel = $CHAN/" $VDR_CONFIG/setup.conf
    sleep 1
    fi
    fi


    getplugins
    echo "Starting $DESC: $VERSION"
    su $VDRUSR -c "$VDRPRG $VDROPT $USRDEV $PLUGINS"
    if [ $? -eq 0 -o $? -eq 2 ] ; then
    exit
    fi
    date
    echo "Restarting $DESC:"
    killall -q -TERM $VDRPRG >/dev/null 2>&1
    sleep 3
    date
    if cd $MYPATH/DVB/build-2.$(uname -r | sed -e 's/^2\.\(.\).*/\1/') 2>/dev/null ; then
    # = 1.1.1
    ./insmod.sh reload
    else
    # = 1.0.1
    #cd $MYPATH/DVB/driver ; make rmmod ; make insmod
    modules rmmod
    modules modprobe
    fi
    done




    Gruß
    Mario

  • Besten Dank für die schnelle Antwort. Funktioniert mit dem Tip jetzt super. Habe wieder mal viel zu kompliziert gedacht.


    Wünschenswert wäre jetzt noch, wenn der VDR gestartet wird, dass der Xine-Player auch gleich mitstartet. Geht das ?



    Gruß
    Mario

    Suse 8.2 #
    Multitainer 733Mhz #256 MB#120 GB
    Technotrend DVB-S 1.5#

  • Hallo Ronny,


    funktioniert hervorragend. Ein Frage noch, was hat {XINE_OPT} zu bedeuten? Beim Start hat er das immer angemeckert ich habe es dann entfernt.


    Gruß
    Mario

    Suse 8.2 #
    Multitainer 733Mhz #256 MB#120 GB
    Technotrend DVB-S 1.5#

  • Wo sind denn die ganzen Beiträge von "ronnykornexl" hin. Der hat denkichmal ziemlich viele auch für mich relevante Probleme gelöst/beantwortet. Nur leider hat er am 27.10.2005 wahrscheinlich ganz schön schlechte Laune gehabt!?


    So unterhält sich "asmodeus" in diesem Threat jetzt ganz alleine... :(


    Gruß
    tetzlav

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!