arch linux

Forum principale per problemi di compilazione, installazione, configurazione etc.

Moderatori: ragno, tapino, alez, zulu, davidea

antonio 7319
Messaggi: 166
Iscritto il: 31 gen 2007, 23:23

arch linux

Messaggio da antonio 7319 »

ciao
un aiuto
dopo vari tentativi la mia vdrbox procede anche se lentamente
da consol col comando ./vdr -c /e t c/vdr --lirc totto funziona
ho creato lo script vdr in etc/rc.d dato i permessi ma all'avvio del sistema da sola non parte
devo sempre dare il cpmando da consoll ho seguito la guida una vdrbox con arch linux
presente sul sito installando pero vdr 1.6.0
aggiunto lo script vdr alla lista dei demoni da caricare ma nulla
dove sbaglio
bay
marlon
Messaggi: 57
Iscritto il: 20 feb 2007, 17:49

Re: arch linux

Messaggio da marlon »

prova a postare lo script di avvio così possiamo vedere se c'è qualcosa che non va
antonio 7319
Messaggi: 166
Iscritto il: 31 gen 2007, 23:23

Re: arch linux

Messaggio da antonio 7319 »

ciao
questo e lo script vdr
#!/bin/bash

. /e t c/rc.conf
. /e t c /rc.d/functions

PID1=$(pidof -o %PPID runvdr)
PID2=$(pidof -o %PPID vdr)

case "$1" in
start)
stat_busy "Starting VDR Script"
cd /vdr/current
./runvdr &

if [ $? -gt 0 ]; then
stat_fail
else
add_daemon vdr
stat_done
fi
;;
stop)
stat_busy "Stopping VDR Script"
[ ! -z "$PID1" ] && kill $PID1 &> /dev/null
[ ! -z "$PID2" ] && kill $PID2 &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon vdr
stat_done
fi
;;
restart)
$0 stop
sleep 15
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit

questo e run vdr
#!/bin/sh

# runvdr: Loads the DVB driver and runs VDR
#
# 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.
#
# Any command line parameters will be passed on to the
# actual 'vdr' program.
#
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: runvdr 1.19 2006/05/14 16:02:05 kls Exp $

VDRPRG="./vdr"
VDRCMD="$VDRPRG -w 60 -c /e t c/vdr \
-P'skinenigmang' \
-P'dvd' \

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()
{
modprobe dvb-ttpci
}

# Unload all DVB driver modules loaded in LoadDriver():
function UnloadDriver()
{
modprobe -r dvb-ttpci
}

# Load driver if it hasn't been loaded already:
if ! DriverLoaded; then
LoadDriver
fi

while (true) do
eval "$VDRCMD"
if test $? -eq 0 -o $? -eq 2; then exit; fi
echo "`date` reloading DVB driver"
$KILL $VDRPRG
sleep 10
UnloadDriver
LoadDriver
echo "`date` restarting VDR"
done


bay
marlon
Messaggi: 57
Iscritto il: 20 feb 2007, 17:49

Re: arch linux

Messaggio da marlon »

premetto che non capisco gli spazi tra etc (/e t c/) ma credo sia un errore dovuto al copia incolla, in ogni caso controlla... ho confrontato gli script con i miei ed ho notato questo:
1- l'ultima riga del primo script io ho "exit 0", nel tuo manca lo 0
2- nel "runvdr" mancano le virgolette a chiusura della riga di comando dopo i plugins; dovrebbe essere così:

Codice: Seleziona tutto

VDRPRG="./vdr"
VDRCMD="$VDRPRG -w 60 -c /e t c/vdr \
-P'skinenigmang' \
-P'dvd' \
"
Intanto prova così e facci sapere,
ciao!
antonio 7319
Messaggi: 166
Iscritto il: 31 gen 2007, 23:23

Re: arch linux

Messaggio da antonio 7319 »

ciao
gli spazi li ho dovuti mettere perche non riuscivo a postare lo script

mettendo le virgolette al riavvio e partito vdr un paio di volte senza irc
poi la terza volta ricevo questa risposta
vdr: no primary device found - using first device!
riprovando anche da consoll stessa cosa
ho provato a ricaricari i moduli
modprobe dvb-ttpci
modprobe -r dvb-ttpci
ma nulla pensavo fosse un problema di scheda pci
ho provato a far partire un cd live e la scheda me la rileva
bay
marlon
Messaggi: 57
Iscritto il: 20 feb 2007, 17:49

Re: arch linux

Messaggio da marlon »

le informazioni sono un po' poche per poter individuare il problema, magari prova senza i plugins
antonio 7319
Messaggi: 166
Iscritto il: 31 gen 2007, 23:23

Re: arch linux

Messaggio da antonio 7319 »

ciao
per l'avvio ho risolto una cavolata non avevo inserito il modulo da caricare
in rc.conf pero mi rimane il problema con lirc non riesco a farlo partire all'avvio se mando il comando da consoll funziona
qualche consiglio
bay
marlon
Messaggi: 57
Iscritto il: 20 feb 2007, 17:49

Re: arch linux

Messaggio da marlon »

Hai fatto in modo che lirc venga avviato prima di VDR?
antonio 7319
Messaggi: 166
Iscritto il: 31 gen 2007, 23:23

Re: arch linux

Messaggio da antonio 7319 »

ciao
rc.conf l'ho messo al primo posto
DAEMONS=(lircd syslog-ng vdr network sshd !netfs !crond)
dovrebbere essere aposto
bay
marlon
Messaggi: 57
Iscritto il: 20 feb 2007, 17:49

Re: arch linux

Messaggio da marlon »

prova ad usare il parametro --lirc; se lanci vdr con --help puoi vedere tutti i parametri che puoi passare, compresi quelli dei plugins
antonio 7319
Messaggi: 166
Iscritto il: 31 gen 2007, 23:23

Re: arch linux

Messaggio da antonio 7319 »

ciao
con questo comando ./vdr -c /e t c/vdr --help
[root@vdrbox current]# ./vdr -c /e t c/vdr --help


Usage: vdr [OPTIONS]

-a CMD, --audio=CMD send Dolby Digital audio to stdin of command CMD
-c DIR, --config=DIR read config files from DIR (default: /video)
-d, --daemon run in daemon mode
-D NUM, --device=NUM use only the given DVB device (NUM = 0, 1, 2...)
there may be several -D options (default: all DVB
devices will be used)
-E FILE, --epgfile=FILE write the EPG data into the given FILE (default is
'epg.data' in the video directory)
'-E-' disables this
if FILE is a directory, the default EPG file will be
created in that directory
-g DIR, --grab=DIR write images from the SVDRP command GRAB into the
given DIR; DIR must be the full path name of an
existing directory, without any "..", double '/'
or symlinks (default: none, same as -g-)
-h, --help print this help and exit
-l LEVEL, --log=LEVEL set log level (default: 3)
0 = no logging, 1 = errors only,
2 = errors and info, 3 = errors, info and debug
if logging should be done to LOG_LOCALn instead of
LOG_USER, add '.n' to LEVEL, as in 3.7 (n=0..7)
-L DIR, --lib=DIR search for plugins in DIR (default is ./PLUGINS/lib)
--lirc[=PATH] use a LIRC remote control device, attached to PATH
(default: /dev/lircd)
--localedir=DIR search for locale files in DIR (default is
./locale)
-m, --mute mute audio of the primary DVB device at startup
--no-kbd don't use the keyboard as an input device
-p PORT, --port=PORT use PORT for SVDRP (default: 2001)
0 turns off SVDRP
-P OPT, --plugin=OPT load a plugin defined by the given options
--rcu[=PATH] use a remote control device, attached to PATH
(default: /dev/ttyS1)
-r CMD, --record=CMD call CMD before and after a recording
-s CMD, --shutdown=CMD call CMD to shutdown the computer
-t TTY, --terminal=TTY controlling tty
-u USER, --user=USER run as user USER; only applicable if started as
root
--userdump allow coredumps if -u is given (debugging)
-v DIR, --video=DIR use DIR as video directory (default: /video)
-V, --version print version information and exit
--vfat encode special characters in recording names to
avoid problems with VFAT file systems
-w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC
seconds (default: 0); '0' disables the watchdog

Plugins: vdr -P"name [OPTIONS]"

dvd (0.3.6-b03) - turn VDR into an (almost) full featured DVD player

-C DEV, --dvd=DEV use DEV as the DVD device (default: /dev/dvd)

skinenigmang (0.0.4) - EnigmaNG skin

-i , --epgimages= Set directory where epgimages are stored
-l , --logodir= Set directory where logos are stored.

reelchannelscan (0.4.3) - Search Transponders for DVB Channels
[root@vdrbox current]#
bay
Avatar utente
ragno
Messaggi: 3017
Iscritto il: 20 gen 2007, 09:43
Località: Marte e dintorni
Contatta:

Re: arch linux

Messaggio da ragno »

Invece di startare vdr come servizio, potresti semplicemente forzarne l'avvio tramite inittab:

Codice: Seleziona tutto

vdr:123:respawn:/e tc/vdr/runvdr >& /dev/tty12
Questo avvia per i runlevel 1,2 e 3 lo script in /e tc/vdr/runvdr con output su console tty12 (f12). Nel caso in cui lo script ha termine sara' riavviato nuovamente (respawn).
Per killarlo manualmente premi ctrl-c in console 12 finche' init non si stufa di avviarlo.

Per riavviarlo

Codice: Seleziona tutto

kill -HUP 1
saluti
ragno
vdr: 1.4.7+extpatch54 (pensionata), 1.7.27 (yavdr 0.4)
Percorri la via che porta al sole,
e non camminare sui sentieri oscuri.

E quando penso che sia finita,
è proprio allora che comincia la salita.
antonio 7319
Messaggi: 166
Iscritto il: 31 gen 2007, 23:23

Re: arch linux

Messaggio da antonio 7319 »

ciao ragno
potresti essere un po piu chiaro di cosa devo fare
bay
antonio 7319
Messaggi: 166
Iscritto il: 31 gen 2007, 23:23

Re: arch linux

Messaggio da antonio 7319 »

ciao
ok risolto
antonio 7319
Messaggi: 166
Iscritto il: 31 gen 2007, 23:23

Re: arch linux

Messaggio da antonio 7319 »

ciao
ok risolto
Rispondi