menu.lua (d2187b39cf671004ce1b7dc8f152b8b1cce6885b) menu.lua (277f38abffc6a8160b5044128b5b2c620fbb970c)
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

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

127 end,
128 func = function(_, choice, _)
129 bootenvSet(choice)
130 end,
131 alias = {"a", "A"},
132 },
133 {
134 entry_type = core.MENU_ENTRY,
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

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

127 end,
128 func = function(_, choice, _)
129 bootenvSet(choice)
130 end,
131 alias = {"a", "A"},
132 },
133 {
134 entry_type = core.MENU_ENTRY,
135 visible = function()
136 return core.isRewinded() == false
137 end,
135 name = function()
136 return color.highlight("b") .. "ootfs: " ..
137 core.bootenvDefault()
138 end,
139 func = function()
140 -- Reset active boot environment to the default
141 config.setCarouselIndex("be_active", 1)
142 bootenvSet(core.bootenvDefault())

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

245 entry_type = core.MENU_SEPARATOR,
246 },
247 {
248 entry_type = core.MENU_SEPARATOR,
249 name = "Options:",
250 },
251 menu_entries.kernel_options,
252 menu_entries.boot_options,
138 name = function()
139 return color.highlight("b") .. "ootfs: " ..
140 core.bootenvDefault()
141 end,
142 func = function()
143 -- Reset active boot environment to the default
144 config.setCarouselIndex("be_active", 1)
145 bootenvSet(core.bootenvDefault())

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

248 entry_type = core.MENU_SEPARATOR,
249 },
250 {
251 entry_type = core.MENU_SEPARATOR,
252 name = "Options:",
253 },
254 menu_entries.kernel_options,
255 menu_entries.boot_options,
256 menu_entries.zpool_checkpoints,
253 menu_entries.boot_envs,
254 menu_entries.chainload,
255 }
256 end,
257 all_entries = {
258 multi_user = {
259 entry_type = core.MENU_ENTRY,
260 name = color.highlight("B") .. "oot Multi user " ..

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

329 alias = {"k", "K"},
330 },
331 boot_options = {
332 entry_type = core.MENU_SUBMENU,
333 name = "Boot " .. color.highlight("O") .. "ptions",
334 submenu = menu.boot_options,
335 alias = {"o", "O"},
336 },
257 menu_entries.boot_envs,
258 menu_entries.chainload,
259 }
260 end,
261 all_entries = {
262 multi_user = {
263 entry_type = core.MENU_ENTRY,
264 name = color.highlight("B") .. "oot Multi user " ..

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

333 alias = {"k", "K"},
334 },
335 boot_options = {
336 entry_type = core.MENU_SUBMENU,
337 name = "Boot " .. color.highlight("O") .. "ptions",
338 submenu = menu.boot_options,
339 alias = {"o", "O"},
340 },
341 zpool_checkpoints = {
342 entry_type = core.MENU_ENTRY,
343 name = function()
344 rewind = "No"
345 if core.isRewinded() then
346 rewind = "Yes"
347 end
348 return "Rewind ZFS " .. color.highlight("C") ..
349 "heckpoint: " .. rewind
350 end,
351 func = function()
352 core.changeRewindCheckpoint()
353 if core.isRewinded() then
354 bootenvSet(
355 core.bootenvDefaultRewinded())
356 else
357 bootenvSet(core.bootenvDefault())
358 end
359 config.setCarouselIndex("be_active", 1)
360 end,
361 visible = function()
362 return core.isZFSBoot() and
363 core.isCheckpointed()
364 end,
365 alias = {"c", "C"},
366 },
337 boot_envs = {
338 entry_type = core.MENU_SUBMENU,
339 visible = function()
340 return core.isZFSBoot() and
341 #core.bootenvList() > 1
342 end,
343 name = "Boot " .. color.highlight("E") .. "nvironments",
344 submenu = menu.boot_environments,

--- 163 unchanged lines hidden ---
367 boot_envs = {
368 entry_type = core.MENU_SUBMENU,
369 visible = function()
370 return core.isZFSBoot() and
371 #core.bootenvList() > 1
372 end,
373 name = "Boot " .. color.highlight("E") .. "nvironments",
374 submenu = menu.boot_environments,

--- 163 unchanged lines hidden ---