Add support for saving pid file.

This adds new setting in [global] named "pidfile". This setting
holds filename in which pid of the oscam process would be written
on start/restart.

Example oscam.conf:

[global]
pidfile = /var/run/oscam.pid

This closes ticket #3079.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8172 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Fix minor typos in log messages.

Fixes ticket #3083.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8173 4b0bc96b-bc66-0410-9d44-ebda105a78c1
webif: Prevent segfault when saving reader that do not exists.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8174 4b0bc96b-bc66-0410-9d44-ebda105a78c1
config/reader: Convert reader config to use the generic parser.

Now with much cleaner code and savings all over :)

binary size  from 21889 to 20126 -> 1736 bytes less
source size  from 42969 to 36519 -> 6450 bytes less
source lines from 1609  to 1228  ->  381 lines less

In addition this fixes ticket #3043.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8175 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Added new parameter 'pidfile' to documentation.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8176 4b0bc96b-bc66-0410-9d44-ebda105a78c1
config/reader: Fix build error when WITH_LB is disabled.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8177 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Add -I command line parameter (set syslog ident).

With -I user can set the ident used by oscam when logging to syslog.
The default ident is "oscam".

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8178 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Add -B command line parameter (set pidfile name).

Using -B sets pidfile name and takes precedence over pidfile= setting
in [global] section of oscam.conf.

Now you can run oscam as proper daemon by executing:

   `oscam -c conf_dir -b -B oscam.pid`

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8179 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Disable parsing of mg-encrypted temporary to fix powerpc crash.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8180 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Proper fix for ticket #3085 (oscam crashing).

Its a little bit of mistery why the code is not crashing on x86/x86_64
because it does exactly the same as STBs.

If mg-encrypted was not set (or properly formated), AES_decrypt()
and strtok_r() were called on a pointer to NULL because buf was
never allocated.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8181 4b0bc96b-bc66-0410-9d44-ebda105a78c1
webif: Do not lose pidfile setting when saving global config.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8182 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Reader's label can now be anything, stop trying to lowercase it.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8183 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Added new commandline option '-l' to documentation.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8184 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Added new commandline option '-B' to documentation.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8185 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Fix the type of pand_send_ecm variable in struct s_reader.

It is parsed in the config as uint8_t and struct s_client have
it as uint8_t.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8186 4b0bc96b-bc66-0410-9d44-ebda105a78c1
devtools: Add script that checks command line parameters.

The script will work after long cmdline parameters are introduced
in the next commit.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8187 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Add support for long command line parameters.

Short parameters (-c) are nice when you are running something quickly
from the command line, but long parameters (--config-dir) have advantages
that they are kind of self documenting.

For example you pretty much have to look at the help when you see oscam
process in `ps` that is run with `oscam -c /etc -u -a -r 2 -w 0`. Well
now it would be possible to see: `oscam --config-dir /etc --utf8 --crash-dump --restart 2 --wait 0`

Currently we have 16 command line parameters and probably at some
point we are going add more. Once the command line parameters
start to get into two digit numbers relying only on short parameters
is starting to be an issue.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8188 4b0bc96b-bc66-0410-9d44-ebda105a78c1
freebsd