Skip to content

Commit

Permalink
Merge 30a3209 into 4814c0e
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Feb 15, 2022
2 parents 4814c0e + 30a3209 commit 19bd248
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
7 changes: 7 additions & 0 deletions package/yast2-update.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Feb 14 17:20:32 UTC 2022 - Ladislav Slezák <lslezak@suse.cz>

- Use the "norecovery" mount option when searching the root
partitions (bsc#1195894)
- 4.3.4

-------------------------------------------------------------------
Fri Jul 23 08:56:04 UTC 2021 - José Iván López González <jlopez@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-update.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-update
Version: 4.3.3
Version: 4.3.4
Release: 0
Summary: YaST2 - Update
Group: System/YaST
Expand Down
10 changes: 8 additions & 2 deletions src/modules/RootPart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class RootPartClass < Module
include Logger
NON_MODULAR_FS = ["devtmpfs", "none", "proc", "sysfs"].freeze

# filesystems which support the "norecovery" mount options
NORECOVERY_FS = [:btrfs, :ext3, :ext4, :xfs].freeze

def main
Yast.import "UI"

Expand Down Expand Up @@ -1526,13 +1529,16 @@ def CheckPartition(filesystem)
SCR.Execute(path(".target.modprobe"), mount_type, "")
end

mount_options = ["ro"]
mount_options << "norecovery" if NORECOVERY_FS.include?(freshman[:fs])

# mount (read-only) partition to Installation::destdir
log.debug("Mounting #{[p_dev, Installation.destdir, Installation.mountlog].inspect}")
log.info "Mounting #{p_dev} with options #{mount_options}"
mount =
SCR.Execute(
path(".target.mount"),
[p_dev, Installation.destdir, Installation.mountlog],
"-o ro"
"-o #{mount_options.join(",")}"
)

if Convert.to_boolean(mount)
Expand Down

0 comments on commit 19bd248

Please sign in to comment.