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
skip patching absolute symlinks during finalize stage (related to issue 1338) #2055
skip patching absolute symlinks during finalize stage (related to issue 1338) #2055
Conversation
…owards issue 1338)
…ink handling in 320_migrate_network_configuration_files.sh but that code it too obsure for me
For me on SLES12-SP4 with UEFI |
I can test this PR on my Arch Linux where I've observed this behavior for first time (#2047 (comment)), but not sooner that tomorrow (27th Feb) afternoon ... V. |
…here or mess around with udev rules that are created and maintained by systemd/udev
With my above recent
I get during finalize stage the restored
I do no longer get a etc/udev/rules.d/70-persistent-net.rules To no longer get etc/udev/rules.d/70-persistent-net.rules |
When I was running test restore of my Arch Linux (with EFISTUB, because EFISTUB is cool :-)) I've hit something which does not feel right to me.
Now I was tempted to manually update my restored fstab because it did not had right UUIDs ... What about moving 020_confirm_finalize.sh to later stage, ideally very close before V. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've run code from this patch on my Arch Linux with EFISTUB boot twice:
- migrated /dev/sda => /dev/sdb
- regular restore /dev/sda => /dev/sda
and in both cases it worked flawlessly!
V.
@gozora You are absolutely right that 020_confirm_finalize.sh is too early. When I added it via So 020_confirm_finalize.sh must be after ReaR had changed |
…uns after the file migration scripts
With my latest
FYI:
because that 'while' loop (and the 'tee') run endlessly so that I won't be able |
If there are no objections I would like to merge it today afternoon. |
At least my browser shows here below
but the [Details] link
so that I think actually all is o.k. and I can merge it now... |
Type: Bug Fix Enhancement Cleanup
Impact: Normal
Reference to related issue (URL):
skip patching absolute symlinks during finalize stage
is only a first step towards actually fixing
Potentially patching wrong files during recovery #1338
How was this pull request tested?
Not yet tested and not yet complete - some more commits are needed...
Brief description of the changes in this pull request:
All finalize scripts that patch restored files within TARGET_FS_ROOT
should do the same symlink handling which means
Skip patching symlink targets that are not within TARGET_FS_ROOT
(i.e. when it is an absolute symlink)
Skip patching if the symlink target contains /proc/ /sys/ /dev/ or /run/
Skip patching dead symlinks
Skip patching symlink targets that are not within TARGET_FS_ROOT
does not actually fix #1338
but at least it should avoid patching wrong files
so that for now this pull request before the ReaR 2.5 release
is meant only as a first step towards actually fixing
#1338