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

Ensure syntactically correct 'disk' and 'part' entries in disklayout.conf #2804

Merged
merged 1 commit into from May 18, 2022

Conversation

jsmeix
Copy link
Member

@jsmeix jsmeix commented May 10, 2022

In layout/save/GNU/Linux/200_partition_layout.sh
ensure syntactically correct 'disk' and 'part' entries

…conf

In layout/save/GNU/Linux/200_partition_layout.sh
ensure syntactically correct 'disk' and 'part' entries, cf.
#2801 (comment)
@jsmeix jsmeix added the enhancement Adaptions and new features label May 10, 2022
@jsmeix jsmeix added this to the ReaR v2.7 milestone May 10, 2022
@jsmeix jsmeix requested a review from a team May 10, 2022 10:32
@jsmeix jsmeix self-assigned this May 10, 2022
@jsmeix
Copy link
Member Author

jsmeix commented May 11, 2022

This pull request was triggered by
#2801 (comment)
therein in particular the last part that reads

I will have a look at
usr/share/rear/layout/save/GNU/Linux/200_partition_layout.sh
how to make it behave more reliably and failsafe,
in particular error out directly therein when things failed
instead of error out later in 950_verify_disklayout_file.sh

Therefore the changes in this pull request are
generic enhancements to detect early i.e. directly
in the code where the entries are genereated in
layout/save/GNU/Linux/200_partition_layout.sh
when invalid entries would be generated
(regardless what the actual reason is), see
#2801 (comment)

Because I get same disklayout.conf on my homeoffice laptop
there should be no regressions because of those changes
so that I would like to merge them tomorrow afternoon
unless there are objections form one of you
@rear/contributors

@jsmeix
Copy link
Member Author

jsmeix commented May 13, 2022

I will wait until @pcahyna had done his tests, see
#2803 (comment)

Copy link
Member

@pcahyna pcahyna left a comment

Choose a reason for hiding this comment

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

For tests with more diverse disk layouts see #2803

@jsmeix jsmeix merged commit b62004d into master May 18, 2022
@jsmeix jsmeix deleted the jsmeix-ensure-disk-part-syntax branch May 18, 2022 12:17
@jsmeix
Copy link
Member Author

jsmeix commented May 30, 2022

Via
0a1d634
we do no longer error out when there is no partition label type value
for a 'disk' entry in disklayout.conf because "rear recover" works
in a special case without partition label type value when there is
only a 'disk' entry but nothing else for this disk exists in disklayout.conf
which can happen when /dev/sdX is an empty SD card slot without medium, see
#2810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants