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

400_restore_duplicity.sh does unconditioned 'export HOSTNAME=$(hostname)' #1879

Closed
jsmeix opened this issue Jul 25, 2018 · 3 comments
Closed
Assignees
Labels
cleanup fixed / solved / done minor bug An alternative or workaround exists
Milestone

Comments

@jsmeix
Copy link
Member

jsmeix commented Jul 25, 2018

  • ReaR version ("/usr/sbin/rear -V"):
    current master code

  • Brief description of the issue:
    In restore/DUPLICITY/default/400_restore_duplicity.sh there is

if [ "$BACKUP_PROG" = "duplicity" ]; then
...
    export HOSTNAME=$(hostname)

which means if at this point the HOSTNAME is not what hostname outputs
then the current HOSTNAME value is changed to what hostname outputs
not only while 400_restore_duplicity.sh runs but
also for all subsequent scripts that run afterwards.

This conflicts with how the HOSTNAME variable is meant to be used in ReaR.

By default he HOSTNAME value is set in default.conf as

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

which could be different compared to HOSTNAME=$(hostname).

Additionally the HOSTNAME value can be specified different by the user
as he likes or needs in his particular case in his etc/rear/local.conf

  • Work-around, if any:
    Use a different Duplicity specific variable name.
@jsmeix jsmeix added the minor bug An alternative or workaround exists label Jul 25, 2018
@jsmeix jsmeix added this to the ReaR v2.5 milestone Jul 25, 2018
@jsmeix
Copy link
Member Author

jsmeix commented Jul 25, 2018

@Lukey3332
could you have a look here because you use Duplicity?

@jsmeix
Copy link
Member Author

jsmeix commented Jul 25, 2018

According to
git log -p --follow usr/share/rear/restore/DUPLICITY/default/400_restore_duplicity.sh
the HOSTNAME=$(hostname) exists since the beginning via
992df3e

jsmeix added a commit that referenced this issue Jul 26, 2018
Remove overwrite of $HOSTNAME in 400_restore_duplicity.sh
see #1879
@jsmeix
Copy link
Member Author

jsmeix commented Jul 26, 2018

With #1880 merged
this issue should be fixed.

@jsmeix jsmeix closed this as completed Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup fixed / solved / done minor bug An alternative or workaround exists
Projects
None yet
Development

No branches or pull requests

2 participants