Hi,
ich versuche gerade vdr mit Hilfe von Mad's Start-Script /etc/init.d/vdr zu starten. Dazu hab ich in /etc/conf.d/vdr folgendes angegeben:
PLUGINS="tvtv,clock,mp3,dvd,mplayer,stream,vcd"
Aber irgendwie baut das script keine brauchbaren Parameter für vdr zusammen. Habe das Script mal um ein paar 'Debug' Ausgaben erweitert.
Da ich aber kein Script Guru bin verstehe ich folgender Stelle nur Bahnhof.
if [ -f "/etc/conf.d/vdr.${i}" -a -n "$(grep "^[A-Z]" /etc/conf.d/vdr.${i} 2>/dev/null )" ]; then
Wo kann ich nachlesen was welcher Befehl macht, ohne mich durch mehrere hundert Seiten kämpfen zu müssen?
Hier noch mal der Ausschnitt aus dem Script und die dazu passende Ausgabe.
Danke Henning
/etc/init.d/vdr
=========
#
# building then options for the plugins
#
[ -n "$LIB" -a -n "$PLUGINS" ] && for i in ${PLUGINS}; do
ebegin "do Loop"
if [ -f "/etc/conf.d/vdr.${i}" -a -n "$(grep "^[A-Z]" /etc/conf.d/vdr.${i} 2>/dev/null )" ]; then
unset pluginopts
for t in $(cat /etc/conf.d/vdr.$i | grep "^[A-Z]"); do
unset value option
value=$(echo $t| cut -d "=" -f 2 | tr -d "\"")
option=$(echo $t| cut -d "=" -f 1 | tr "[:upper:]" "[:lower:]")
pluginopts="${pluginopts} --$option=$value"
done
ebegin "Plugin options: ${pluginopts}"
vdropts="${vdropts} --plugin='$i ${pluginopts}'"
ebegin "VDR options: ${vdropts}"
else
vdropts="${vdropts} --plugin=$i"
ebegin "else Block: ${vdropts} :/: ${i}"
fi
done
Ausgabe:
=======
* Starting vdr (1.1.25) - The Video Disk Recorder...
* do Loop...
* else Block: --config=/etc/vdr --lib=/usr/lib --plugin=tvtv,clock,mp3,dvd,mplayer,stream,vcd :/: tvtv,clock,mp3,dvd,mplayer,stream,vcd...