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

'cd somedir' without returning back in BORG/default/400_restore_backup.sh #1678

Closed
jsmeix opened this issue Jan 4, 2018 · 2 comments
Closed
Assignees
Labels
bug The code does not do what it is meant to do fixed / solved / done
Milestone

Comments

@jsmeix
Copy link
Member

jsmeix commented Jan 4, 2018

Current restore/BORG/default/400_restore_backup.sh does

cd $TARGET_FS_ROOT

but never returns from there to the usual working directory
where "rear recover" runs in.
Even if that somehow works it looks dangerous when
all subsequent scripts run with $TARGET_FS_ROOT
as the current working directory.
I suggest to use

pushd $TARGET_FS_ROOT
...
popd

cf. usr/share/rear/build/default/501_check_ssh_keys.sh
and usr/share/rear/pack/GNU/Linux/900_create_initramfs.sh

@jsmeix jsmeix added the bug The code does not do what it is meant to do label Jan 4, 2018
@jsmeix jsmeix added this to the ReaR v2.4 milestone Jan 4, 2018
@gozora
Copy link
Member

gozora commented Jan 4, 2018

@jsmeix thanks for pointing this out!
This could introduce some nasty surprises in the future indeed!
I'll correct it in upcoming days.

V.

@gozora
Copy link
Member

gozora commented Jan 23, 2018

With #1698 merged, this issue can be closed!

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 fixed / solved / done
Projects
None yet
Development

No branches or pull requests

2 participants