-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
storage: Don't offer to mount while formatting in Anaconda mode #19807
Merged
mvollmer
merged 2 commits into
cockpit-project:main
from
mvollmer:storage-no-anaconda-mounting
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,24 +147,35 @@ export const MountPoint = ({ fstab_config, forced_options, backing_block, conten | |
} | ||
|
||
let extra_text = null; | ||
if (!is_filesystem_mounted) { | ||
if (client.in_anaconda_mode()) { | ||
if (!old_dir) | ||
extra_text = _("The filesystem has no permanent mount point."); | ||
else | ||
extra_text = _("The filesystem is not mounted."); | ||
} else if (backing_block != content_block) { | ||
if (!opt_never_auto) | ||
extra_text = _("The filesystem will be unlocked and mounted on the next boot. This might require inputting a passphrase."); | ||
extra_text = _("The filesystem has no assigned mount point."); | ||
} else { | ||
if (!is_filesystem_mounted) { | ||
if (!old_dir) | ||
extra_text = _("The filesystem has no permanent mount point."); | ||
else | ||
extra_text = _("The filesystem is not mounted."); | ||
} else if (backing_block != content_block) { | ||
if (!opt_never_auto) | ||
extra_text = _("The filesystem will be unlocked and mounted on the next boot. This might require inputting a passphrase."); | ||
} | ||
} | ||
|
||
if (!mount_point_text) { | ||
mount_point_text = extra_text; | ||
extra_text = null; | ||
} | ||
|
||
if (extra_text && mount_point_text) | ||
if (extra_text) | ||
extra_text = <><br />{extra_text}</>; | ||
|
||
return ( | ||
<> | ||
{ mount_point_text && | ||
<Flex> | ||
{ mount_point_text && | ||
<FlexItem>{ mount_point_text }</FlexItem> | ||
} | ||
<FlexItem> | ||
<StorageLink onClick={() => mounting_dialog(client, | ||
content_block || backing_block, | ||
|
@@ -174,7 +185,6 @@ export const MountPoint = ({ fstab_config, forced_options, backing_block, conten | |
</StorageLink> | ||
</FlexItem> | ||
</Flex> | ||
} | ||
{ extra_text } | ||
</>); | ||
}; | ||
|
@@ -185,9 +195,13 @@ export const mount_point_text = (mount_point, mounted) => { | |
mp_text = client.strip_mount_point_prefix(mount_point); | ||
if (mp_text == false) | ||
return null; | ||
if (!mounted) | ||
if (!mounted && !client.in_anaconda_mode()) | ||
mp_text = mp_text + " " + _("(not mounted)"); | ||
} else | ||
mp_text = _("(not mounted)"); | ||
} else { | ||
if (client.in_anaconda_mode()) | ||
mp_text = _("(no assigned mount point)"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This added line is not executed by any test. Details |
||
else | ||
mp_text = _("(not mounted)"); | ||
} | ||
return mp_text; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule reference
updated
10 files
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This added line is not executed by any test. Details