1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-02 15:27:59 +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:
Samuel Dionne-Riel 2023-03-22 16:29:58 -04:00 committed by GitHub
commit 7a6e97e3af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,7 +158,7 @@ module System
# @param dest [String] Destination path to mount to
# @param type [String] Type of the mount (+-t+).
# @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.
unless dest
dest = source
@ -174,10 +174,14 @@ module System
args << "-t"
args << type
end
if options
# Filter options that busybox mount can't handle.
options = options.select { |option| !option.match(/^x-/) }
unless options.empty?
args << "-o"
args << options.join(",")
end
args << source
args << dest