parent
48554cf310
commit
19b0f28f16
@ -9,3 +9,22 @@
|
|||||||
#
|
#
|
||||||
# Please note that using the systemd hooks result in no access to the emergency recovery shell
|
# Please note that using the systemd hooks result in no access to the emergency recovery shell
|
||||||
useSystemdHook: false
|
useSystemdHook: false
|
||||||
|
|
||||||
|
#
|
||||||
|
# Modifications to the standard list of hooks.
|
||||||
|
#
|
||||||
|
# There are three subkeys:
|
||||||
|
# - prepend, which puts hooks at the beginning of the
|
||||||
|
# list of hooks, in the order specified here,
|
||||||
|
# - append, which adds hooks at the end of the list of
|
||||||
|
# hooks, in the order specified here,
|
||||||
|
# - remove, which removes hooks from the list of hooks,
|
||||||
|
# wherever they may be.
|
||||||
|
#
|
||||||
|
# The example configuration here yields bogus, <stuff>, bogus
|
||||||
|
# initially, and then removes that hook again.
|
||||||
|
#
|
||||||
|
hooks:
|
||||||
|
prepend: [ bogus ]
|
||||||
|
append: [ bogus ]
|
||||||
|
remove: [ bogus ]
|
||||||
|
@ -7,5 +7,10 @@ additionalProperties: false
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
useSystemdHook: { type: boolean }
|
useSystemdHook: { type: boolean }
|
||||||
|
hooks:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
prepend: { type: array, items: string }
|
||||||
|
append: { type: array, items: string }
|
||||||
|
remove: { type: array, items: string }
|
||||||
|
@ -168,6 +168,13 @@ def find_initcpio_features(partitions, root_mount_point):
|
|||||||
hooks.append("keymap")
|
hooks.append("keymap")
|
||||||
hooks.append("consolefont")
|
hooks.append("consolefont")
|
||||||
|
|
||||||
|
hooks_map = libcalamares.job.configuration.get("hooks", None)
|
||||||
|
if not hooks_map:
|
||||||
|
hooks_map = dict()
|
||||||
|
hooks_prepend = hooks_map.get("prepend", None) or []
|
||||||
|
hooks_append = hooks_map.get("append", None) or []
|
||||||
|
hooks_remove = hooks_map.get("remove", None) or []
|
||||||
|
|
||||||
modules = []
|
modules = []
|
||||||
files = []
|
files = []
|
||||||
binaries = []
|
binaries = []
|
||||||
@ -240,6 +247,9 @@ def find_initcpio_features(partitions, root_mount_point):
|
|||||||
else:
|
else:
|
||||||
hooks.append("fsck")
|
hooks.append("fsck")
|
||||||
|
|
||||||
|
# Modify according to the keys in the configuration
|
||||||
|
hooks = [h for h in (hooks_prepend + hooks + hooks_append) if h not in hooks_remove]
|
||||||
|
|
||||||
return hooks, modules, files, binaries
|
return hooks, modules, files, binaries
|
||||||
|
|
||||||
|
|
||||||
|
7
src/modules/initcpiocfg/test.yaml
Normal file
7
src/modules/initcpiocfg/test.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# SPDX-FileCopyrightText: no
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
rootMountPoint: /tmp/mount
|
||||||
|
partitions:
|
||||||
|
- fs: ext4
|
||||||
|
mountPoint: "/"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user