Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: possible bug: VDR1.2.5 commandline interpreting
Alfred Zastrow wrote:
>
> ...
> @Klaus
>
> I found some more strange commandline handling, please take a look to
> the following examples:
I'll use the following short shell script to test these:
#!/bin/sh
echo $1
echo $2
echo $3
echo $4
echo $5
> This works:
> -----------
> # opt="-P dvd '-C/dev/cdroms/cdrom0'"
> # vdr $opt [more parameters...]
If I call the above script with
script $opt more
I get
-P
dvd
'-C/dev/cdroms/cdrom0'
more
The -C... option is recognized since it starts with a ', and
VDR just ignores this parameter.
> This doesn't work:
> ------------------
> # opt="-P'dvd -C/dev/cdroms/cdrom0'"
> # vdr $opt [more parameters...]
-P'dvd
-C/dev/cdroms/cdrom0'
more
Here the plugin name is 'dvd, which obviously isn't right.
This is a shell/quoting problem, not a VDR problem.
> This works:
> -----------
> opt="-P vcd"
> # vdr --lib=/lib/vdr $opt [more parameters...]
--lib=/lib/vdr
-P
vcd
more
Looks good, there is one parameter to the -P option, which
is the plugin name, and the --lib option comes _before_ the
-P option, as it should be.
> This doesn't work:
> ------------------
> opt="-P vcd"
> # vdr $opt --lib=/lib/vdr [more parameters...]
-P
vcd
--lib=/lib/vdr
more
Assuming that the vcd plugin is located in the /lib/vdr directory,
it is clear that this can't work, because the --lib option must
come _before_ the -P option (see man vdr).
> This also doesn't work:
> -----------------------
> opt="-P'vcd -v /dev/cdroms/cdrom0'"
> # vdr $opt --lib=/lib/vdr [more parameters...]
-P'vcd
-v
/dev/cdroms/cdrom0'
--lib=/lib/vdr
more
> (message vdr: /lib/vdr/libvdr-'vcd.so.1.2.6pre2: cannot open shared
> object file: No such file or directory)
Again the plugin name is given as 'vcd, which is wrong (shell/quoting
problem, not a VDR problem).
> If I modify the first line to
>
> # opt="-Pvcd '-v /dev/cdroms/cdrom0'"
>
> this will be accepted,
-Pvcd
'-v
/dev/cdroms/cdrom0'
--lib=/lib/vdr
more
The second and third parameters don't look good, though (see the ')
> also this version
>
> # opt="-Pvcd \"-v /dev/cdroms/cdrom0\""
-Pvcd
"-v
/dev/cdroms/cdrom0"
--lib=/lib/vdr
more
Same here, just with ".
> The whole thing is pretty unpleasant, because I need a dynamic, not a
> static command line.
What you are describing are all shell and/or quoting problems,
not VDR problems. The last two examples don't cause a VDR error message
because VDR only processes real options and completely ignores non-option
parameters. I'll make a note to change this and issue an error message
if, after processing all options, there are still command line
parameters left. Of course, this wouldn't help you...
Klaus
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index