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,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue