Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Problems with exit-states (VDR-1.2.2)



Am Mittwoch, 27. August 2003 13:09 schrieben Sie:
> Steffen Barszus wrote:

> > Of course it is one big line and further:
> >
> > su -c "vdr --config=/etc/vdr --record=vdrreccmd
> > --shutdown=vdrshutdown \ --terminal=/dev/tty1 --watchdog=60
> > -P\"dxr3 \" -P\"control              \ --terminal=/dev/tty9
> > --port=2002 \" -P\"games \" -P\"mp3              \ --mount=mount.sh
> > --cddb=/var/lib/cddb \"  -P\"mplayer           \ --mount=mount.sh
> > --mplayer=mplayer.sh \" -P\"remote --tty               \ /dev/tty10
> > \" -P\"vcd --vcd=/dev/cdrom \" " vdr
>
> Ok, I've put this in a more readable form:
>
> su -c "vdr --config=/etc/vdr --record=vdrreccmd
> --shutdown=vdrshutdown \ --terminal=/dev/tty1 --watchdog=60 \
>        -P\"dxr3 \" \
>        -P\"control --terminal=/dev/tty9 --port=2002 \" \
>        -P\"games \" \
>        -P\"mp3 --mount=mount.sh --cddb=/var/lib/cddb \" \
>        -P\"mplayer --mount=mount.sh --mplayer=mplayer.sh \" \
>        -P\"remote --tty /dev/tty10 \" \
>        -P\"vcd --vcd=/dev/cdrom \" \
>       " vdr
>
> which is the form I would use if I had a system with lots of plugins.

Well the original is script generated, so the form doesn't really matter 
;)

> Well, actually I guess I would write
>
> su -c 'vdr --config=/etc/vdr --record=vdrreccmd
> --shutdown=vdrshutdown \ --terminal=/dev/tty1 --watchdog=60 \
>        -P"dxr3 " \
>        -P"control --terminal=/dev/tty9 --port=2002 " \
>        -P"games " \
>        -P"mp3 --mount=mount.sh --cddb=/var/lib/cddb " \
>        -P"mplayer --mount=mount.sh --mplayer=mplayer.sh " \
>        -P"remote --tty /dev/tty10 " \
>        -P"vcd --vcd=/dev/cdrom " \
>       ' vdr
>
> which saves a lot of backslashes.

Can't be done in a script, but that does not belong to here (variables 
in single quotes doesn't get expanded)

> However, I can't see anything wrong with quotes or backslashes, so I
> take that remark ("Just because one user has trouble using
> quotes...") back and apologize.
>
> I'll see if I can do some debugging tonight to check whether there is
> a bug in parsing this line.

I will do some further tests too, since i failed too to reproduce it. 

> Are you sure that both the "mp3" and the "mplayer" plugin recognize
> the option "--mount"?

Yep:

mp3 (0.8.0) - A versatile audio player

  -m CMD,   --mount=CMD    use CMD to mount/unmount/eject mp3 sources
                           (default: mount.sh)
  -n CMD,   --network=CMD  execute CMD before & after network access
                           (default: none)
  -B DIR,   --cddb=DIR     search CDDB files in DIR
                           (default: /var/lib/cddb)

mplayer (0.8.0) - A MPlayer calling plugin

  -m CMD,   --mount=CMD    use CMD to mount/unmount/eject mp3 sources
                           (default: mount.sh)
  -M CMD,   --mplayer=CMD  use CMD when calling MPlayer
                           (default: mplayer.sh)


> > > Please send the line **EXACTLY** the way it is given to the
> > > shell. That's either with '\' at the end of wrapped lines, or as
> > > one single long line (make sure your mailer doesn't wrap it!).
> >
> > See above.


> > Well  .... vdr reads is own config too, why shouldn't a plugin read
> > its config the same way ?
>
> Plugins already store their config parameters (those presented to the
> user through the respective "Setup" menu, as well as other status
> variables they would like to "survive" a restart of VDR) in that very
> same file.
>
> What I'm talking about here are those parameters that the plugins
> need to know when the program ist _started_. For instance, the
> "control" plugin needs to know which terminal to use. If I want to
> vary that parameter I find it easier to give it in the command line
> than to edit a config file.

Well that is true for a fast start on cli. But for regulary use it would 
be easier to edit a config file and make a SIGHUP on vdr or a service 
vdr restart or the like. 

> > I don't see where an orgy of config files should
> > come from ?
>
> Well, every plugin using it's own config file?!

Well is this really a mess ? I think its a mess to edit in a script 
everytime i want to change something. I guess we have a different point 
of view ;)

> > And the "one user has trouble using quotes the right way"
> > is a bit harsh, it is even not clarified that the problems do come
> > from the quoting.
>
> See above.
>
> > Of course vdr is your baby, but i don't see the cause you
> > react that way.
>
> Well, sometimes one has to make one's intentions very clear,
> very fast, because once plugin authors start messing with config
> files there's probably no way of stopping them. I, personally,
> think that using command line parameters should be the way to go.
> Nothing keeps people from writing their individual VDR start sequence
> into a file, like the example I wrote above!

Yep, that is what Rene and I are trying , ending up in a config file for 
each plugin. ;) In fact it are two config files for some plugins. 

> > > So, again
> > >
> > > ****************************************************
> > > PLEASE, DON'T DO THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> > > ****************************************************
> > >
> > > I'd hate to have to edit config files if all I want is to set a
> > > simple parameter for a plugin.
> >
> > does it exclude each other ?
>
> I don't think anybody would go to the trouble of implementing _both_
> features.

Well I'm neither a c++ programmer nor i have written a plugin, but from 
my understanding it doesn't need to be something plugin developers have 
to concern about. (Thinking about next vdr developer version) From my 
understanding it wouldn't be that hard, to encapsulate reading of the 
config, so that   mount=mount.sh (in mp3.conf) and mp3 --mount=mount.sh 
is the same for the plugin. This is just an idea and if nobody else 
think this would be usefull i shut up and will be quiet ;)

> > > I know I can't enjoin on plugin developers how to handle their
> > > parameters, but I strongly advise to stay with using command line
> > > parameters for things that need to be set individually at
> > > startup, and store other things in the setup facilities already
> > > provided. Surely, the plugin interface allows plugins to have
> > > their own config files in the 'ConfigDirectory()', but those are
> > > for other things, not startup parameters.
> > >
> > > Klaus
> >
> > I really don't see why you have these strong concerns ....
>
> Well, I'd like to have plugins use command line options, as the
> plugin interface was designed. I'd hate to see that being broken,
> that's all.
>
> If people feel they need to do this differently, there's probably
> nothing I can do about that, except expressing my "strong
> concerns"...
>

Well and its just an idea andf i think its important to discuss it :)

Steffen



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index