#1169 PR merged: Adapted to Bareos new (since 16.2) configuration schema. Fixes #1077

Labels: enhancement, bug, cleanup, fixed / solved / done

aussendorf opened issue at 2017-01-16 15:16:

Tested with old and new configuration layout on Centos7 in our CI environment.

jsmeix commented at 2017-01-17 08:05:

Regarding default.conf and
usr/share/rear/prep/BAREOS/default/500_check_BAREOS_bconsole_results.sh
and
usr/share/rear/restore/BAREOS/default/400_restore_backup.sh

BAREOS_CLIENT="`hostname -s`-fd"

We have in default.conf

HOSTNAME="$( hostname -s 2>/dev/null || uname -n | cut -d. -f1 )"

I think this one is better (more fail safe because it has a fallback).

Furthermore according to
https://github.com/rear/rear/wiki/Coding-Style

Use $( COMMAND ) instead of backticks `COMMAND`

Therefore I suggest to use this form in default.conf and
usr/share/rear/prep/BAREOS/default/500_check_BAREOS_bconsole_results.sh
and
usr/share/rear/restore/BAREOS/default/400_restore_backup.sh

BAREOS_CLIENT="$HOSTNAME-fd"

aussendorf commented at 2017-01-17 16:41:

changed to $HOSTNAME as suggested.


[Export of Github issue for rear/rear.]