Skip to content

Commit

Permalink
Merge pull request #619 from jsrain/master
Browse files Browse the repository at this point in the history
umount efivars properly (bsc#1063063)
  • Loading branch information
jsrain committed Oct 23, 2017
2 parents f310e47 + 7eb8698 commit 5fd1a8d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
6 changes: 6 additions & 0 deletions package/yast2-installation.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Oct 20 12:59:37 UTC 2017 - jsrain@suse.cz

- umount efivars properly (bsc#1063063)
- 4.0.9

-------------------------------------------------------------------
Mon Oct 16 15:29:07 UTC 2017 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-installation
Version: 4.0.8
Version: 4.0.9
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
17 changes: 9 additions & 8 deletions src/lib/installation/clients/umount_finish.rb
Expand Up @@ -32,6 +32,9 @@ module Yast
class UmountFinishClient < Client
include Yast::Logger

EFIVARS_PATH = "/sys/firmware/efi/efivars".freeze
USB_PATH = "/proc/bus/usb".freeze

def main
Yast.import "Pkg"

Expand Down Expand Up @@ -123,13 +126,11 @@ def main
# /proc

@umount_these = ["/proc", "/sys", "/dev", "/run"]
if Hotplug.haveUSB
@umount_these = Convert.convert(
Builtins.union(["/proc/bus/usb"], @umount_these),
from: "list",
to: "list <string>"
)
end

@umount_these.unshift(USB_PATH) if Hotplug.haveUSB

# exists in both inst-sys and target or in neither
@umount_these.unshift(EFIVARS_PATH) if File.exist?(EFIVARS_PATH)

Builtins.foreach(@umount_these) do |umount_dir|
umount_this = Builtins.sformat(
Expand All @@ -145,7 +146,7 @@ def main
# bnc #395034
# Don't remount them read-only!
if Builtins.contains(
["/proc", "/sys", "/dev", "/proc/bus/usb"],
["/proc", "/sys", "/dev", USB_PATH, EFIVARS_PATH],
umount_dir
)
Builtins.y2warning("Umount failed, trying lazy umount...")
Expand Down

0 comments on commit 5fd1a8d

Please sign in to comment.