Skip to content

Commit

Permalink
umount efivars properly (bsc#1063063)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsrain committed Oct 20, 2017
1 parent f310e47 commit 3069bd5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 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
15 changes: 9 additions & 6 deletions src/lib/installation/clients/umount_finish.rb
Expand Up @@ -122,13 +122,16 @@ def main
# /proc/bus/usb
# /proc

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

@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>"
)
@umount_these.unshift(USB_PATH)
end

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

Builtins.foreach(@umount_these) do |umount_dir|
Expand All @@ -145,7 +148,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 3069bd5

Please sign in to comment.