Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jan 17, 2017

Conversation

aussendorf
Copy link
Contributor

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

@jsmeix
Copy link
Member

jsmeix commented Jan 17, 2017

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"

@jsmeix jsmeix requested a review from gdha January 17, 2017 08:05
@jsmeix jsmeix self-assigned this Jan 17, 2017
@jsmeix jsmeix added bug The code does not do what it is meant to do cleanup enhancement Adaptions and new features labels Jan 17, 2017
@jsmeix jsmeix added this to the Rear v2.1 milestone Jan 17, 2017
Copy link
Member

@gdha gdha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed please consider to use the already defined $HOSTNAME variable, e.g.
BAREOS_CLIENT=${HOSTNAME}-fd

@aussendorf
Copy link
Contributor Author

changed to $HOSTNAME as suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The code does not do what it is meant to do cleanup enhancement Adaptions and new features fixed / solved / done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants