Skip to content

Commit

Permalink
Merge ab14495 into 2bd8630
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed May 4, 2023
2 parents 2bd8630 + ab14495 commit 1e8768e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions src/lib/y2storage/clients/inst_prepdisk.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) [2015-2016] SUSE LLC
# Copyright (c) [2015-2023] SUSE LLC
#
# All Rights Reserved.
#
Expand Down Expand Up @@ -38,8 +38,12 @@ class InstPrepdisk

EFIVARS_PATH = "/sys/firmware/efi/efivars".freeze

def initialize
# Constructor
#
# @param commit_callbacks [Storage::CommitCallbacks, nil]
def initialize(commit_callbacks: nil)
textdomain "storage"
@commit_callbacks = commit_callbacks
end

def run
Expand All @@ -58,13 +62,18 @@ def run

protected

# Callbacks to use for commit
#
# @return [Storage::CommitCallbacks, nil]
attr_reader :commit_callbacks

# Commits the actions to disk
#
# @return [Boolean] true if everything went fine, false if the user
# decided to abort
def commit
manager.rootprefix = Yast::Installation.destdir
return false unless manager.commit(force_rw: true)
return false unless manager.commit(force_rw: true, callbacks: commit_callbacks)

mount_in_target("/dev", "devtmpfs", "-t devtmpfs")
mount_in_target("/proc", "proc", "-t proc")
Expand Down
2 changes: 1 addition & 1 deletion src/lib/y2storage/storage_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def committed?
# The user is asked whether to continue on each error reported by libstorage-ng.
#
# @param force_rw [Boolean] if mount points should be forced to have read/write permissions.
# @param callbacks [Y2Storage::Callbacks::Commit]
# @param callbacks [Storage::CommitCallbacks]
#
# @return [Boolean] whether commit was successful, false if libstorage-ng found a problem and it was
# decided to abort.
Expand Down

0 comments on commit 1e8768e

Please sign in to comment.