add bundle:systemd-boot
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
This commit is contained in:
parent
998a529d4c
commit
e4c317f677
5 changed files with 88 additions and 0 deletions
13
bundles/systemd-boot/files/entry
Executable file
13
bundles/systemd-boot/files/entry
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
title ${config['title']}
|
||||||
|
|
||||||
|
% if 'linux' in config:
|
||||||
|
linux ${config['linux']}
|
||||||
|
% for line in config['initrd']:
|
||||||
|
initrd ${line}
|
||||||
|
% endfor
|
||||||
|
% if config.get('options', set()):
|
||||||
|
options ${' '.join(sorted(config['options']))}
|
||||||
|
% endif
|
||||||
|
% else:
|
||||||
|
efi ${config['efi']}
|
||||||
|
% endif
|
5
bundles/systemd-boot/files/loader.conf
Executable file
5
bundles/systemd-boot/files/loader.conf
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
auto-entries no
|
||||||
|
auto-firmware yes
|
||||||
|
console-mode keep
|
||||||
|
default ${config['default']}
|
||||||
|
timeout ${config.get('timeout', 5)}
|
9
bundles/systemd-boot/files/pacman_hook
Normal file
9
bundles/systemd-boot/files/pacman_hook
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Trigger]
|
||||||
|
Type = Package
|
||||||
|
Operation = Upgrade
|
||||||
|
Target = systemd
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Gracefully upgrading systemd-boot...
|
||||||
|
When = PostTransaction
|
||||||
|
Exec = /usr/bin/systemctl restart systemd-boot-update.service
|
32
bundles/systemd-boot/items.py
Normal file
32
bundles/systemd-boot/items.py
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
assert node.os == 'arch'
|
||||||
|
assert node.metadata.get('systemd-boot/default') in node.metadata.get('systemd-boot/entries')
|
||||||
|
|
||||||
|
files = {
|
||||||
|
'/etc/pacman.d/hooks/99-systemd-boot-update': {
|
||||||
|
'source': 'pacman_hook',
|
||||||
|
},
|
||||||
|
'/boot/loader/loader.conf': {
|
||||||
|
'content_type': 'mako',
|
||||||
|
'context': {
|
||||||
|
'config': node.metadata.get('systemd-boot'),
|
||||||
|
},
|
||||||
|
'mode': None,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
directories = {
|
||||||
|
'/boot/loader/entries': {
|
||||||
|
'purge': True,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for entry, config in node.metadata.get('systemd-boot/entries').items():
|
||||||
|
files[f'/boot/loader/entries/{entry}.conf'] = {
|
||||||
|
'source': 'entry',
|
||||||
|
'content_type': 'mako',
|
||||||
|
'context': {
|
||||||
|
'entry': entry,
|
||||||
|
'config': config,
|
||||||
|
},
|
||||||
|
'mode': None,
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ nodes['kunsi-p14s'] = {
|
||||||
'lldp',
|
'lldp',
|
||||||
'lm-sensors',
|
'lm-sensors',
|
||||||
#'nfs-client',
|
#'nfs-client',
|
||||||
|
'systemd-boot',
|
||||||
'telegraf-battery-usage',
|
'telegraf-battery-usage',
|
||||||
'zfs',
|
'zfs',
|
||||||
},
|
},
|
||||||
|
@ -122,6 +123,34 @@ nodes['kunsi-p14s'] = {
|
||||||
'xclip': {},
|
'xclip': {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'systemd-boot': {
|
||||||
|
'default': 'arch-lts',
|
||||||
|
'entries': {
|
||||||
|
'arch-lts': {
|
||||||
|
'title': 'Arch Linux (LTS kernel)',
|
||||||
|
'linux': '/vmlinuz-linux-lts',
|
||||||
|
'initrd': [
|
||||||
|
'/amd-ucode.img',
|
||||||
|
'/initramfs-linux-lts.img',
|
||||||
|
],
|
||||||
|
'options': {
|
||||||
|
'zfs=zroot/system/root',
|
||||||
|
'rw',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'arch-lts-fallback': {
|
||||||
|
'title': 'Arch Linux (LTS kernel, no ucode, fallback initramfs)',
|
||||||
|
'linux': '/vmlinuz-linux-lts',
|
||||||
|
'initrd': [
|
||||||
|
'/initramfs-linux-lts-fallback.img',
|
||||||
|
],
|
||||||
|
'options': {
|
||||||
|
'zfs=zroot/system/root',
|
||||||
|
'rw',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
'systemd-networkd': {
|
'systemd-networkd': {
|
||||||
'enable-resolved': True,
|
'enable-resolved': True,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue