dir startscript also checks the configuration

Also added a debug message to the dummy libbareoscats library
use config file settings to configure database

Let the database configuration scripts get the configuration parameter from the director config file.
Now, the scripts try to get there values in following order:
  1. environment variable (db_name, db_user, db_password)
  2. director config file
  3. fallback value (from configure)

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
bareos-config get_database_param: use dbcheck

modified get_database_param to use bareos-dbcheck to get database parameter
instead of directly accessing the Bareos Director config file.
Because bareos-dbcheck uses the Bareos config parser this prevents problems with different formating.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
get_database_param: return default value

return the default value, if calling bareos-dhcheck fails.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
Fix typo.
Remove old versions of libraries.
Use Py_InitializeEx() instead of Py_Initialize().
Fix typo.
Drop an unneeded global variable and make it local.
Remove old global variable.
Allow to disable client in client configuration

Fixes #288: Disable client in client configuration
Cleanup header file.
Refactor status printing.

Try to use a POOL_MEM whenever possible so we also don't make mistakes
in the length of the status string a possibly overrun an string. Also
if we don't print a string because of being in API mode it doesn't make
sense to even build the status string (as we are not going to print it
anyway.) Also fixes 2 other Coverity high impatct bugs.
Fix some bugs detected by Coverity.
Cleanup error handling.
Lets not introduce an buffer overun trying to fix an other.
Tweak layout.
Help static analyzer in understanding code.

A static analyzer doesn't understand Emsg(M_ERROR_TERM, ...) so lets put
the rest of the code into the else part of the if so things can be
understood by the analyzer and the basic code path doesn't change much.
handle unset parameter

some scripts (eg. package postinstall script) include bareos-config-lib.sh with settings,
that exit if a variable is undefined.
To prevent problems, function parameter are now used as "${1-}", so that they are never undefined.
Also fixes a bug, when using a database password that contains "/".
"/" is now a allowed character, but "#" is forbidden.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>