mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-03 02:44:13 +03:00
Merge pull request #601 from samueldr-wip/fix/mount-regression
boot/init: Fix mount regression from option added for systemd-boot
This commit is contained in:
commit
7a6e97e3af
@ -158,7 +158,7 @@ module System
|
|||||||
# @param dest [String] Destination path to mount to
|
# @param dest [String] Destination path to mount to
|
||||||
# @param type [String] Type of the mount (+-t+).
|
# @param type [String] Type of the mount (+-t+).
|
||||||
# @param options [Array<String>] Mount options (+-o+).
|
# @param options [Array<String>] Mount options (+-o+).
|
||||||
def self.mount(source, dest = nil, type: nil, options: nil)
|
def self.mount(source, dest = nil, type: nil, options: [])
|
||||||
# Fill-in the "reversed" optional parameters.
|
# Fill-in the "reversed" optional parameters.
|
||||||
unless dest
|
unless dest
|
||||||
dest = source
|
dest = source
|
||||||
@ -174,10 +174,14 @@ module System
|
|||||||
args << "-t"
|
args << "-t"
|
||||||
args << type
|
args << type
|
||||||
end
|
end
|
||||||
if options
|
|
||||||
|
# Filter options that busybox mount can't handle.
|
||||||
|
options = options.select { |option| !option.match(/^x-/) }
|
||||||
|
unless options.empty?
|
||||||
args << "-o"
|
args << "-o"
|
||||||
args << options.join(",")
|
args << options.join(",")
|
||||||
end
|
end
|
||||||
|
|
||||||
args << source
|
args << source
|
||||||
args << dest
|
args << dest
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user