core.lua (aea262bfc480c11865a027e911f8a8d3165a48fc) core.lua (5f8cfbe1348dac0abce73c344af2eab0ccaae732)
1--
2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3--
4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
5-- Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org>
6-- All rights reserved.
7--
8-- Redistribution and use in source and binary forms, with or without

--- 260 unchanged lines hidden (view full) ---

269 loader.perform(composeLoaderCmd("boot", argstr))
270end
271
272function core.isSingleUserBoot()
273 local single_user = loader.getenv("boot_single")
274 return single_user ~= nil and single_user:lower() == "yes"
275end
276
1--
2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3--
4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
5-- Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org>
6-- All rights reserved.
7--
8-- Redistribution and use in source and binary forms, with or without

--- 260 unchanged lines hidden (view full) ---

269 loader.perform(composeLoaderCmd("boot", argstr))
270end
271
272function core.isSingleUserBoot()
273 local single_user = loader.getenv("boot_single")
274 return single_user ~= nil and single_user:lower() == "yes"
275end
276
277function core.isUEFIBoot()
278 local efiver = loader.getenv("efi-version")
279
280 return efiver ~= nil
281end
282
277function core.isZFSBoot()
278 local c = loader.getenv("currdev")
279
280 if c ~= nil then
281 return c:match("^zfs:") ~= nil
282 end
283 return false
284end

--- 86 unchanged lines hidden ---
283function core.isZFSBoot()
284 local c = loader.getenv("currdev")
285
286 if c ~= nil then
287 return c:match("^zfs:") ~= nil
288 end
289 return false
290end

--- 86 unchanged lines hidden ---