mirror of
https://github.com/kairos-io/packages.git
synced 2025-08-25 17:18:35 +00:00
Make kairos-sysext be generic enough to include on all flavors (#477)
This commit is contained in:
parent
4643f91d2f
commit
d8b416baab
@ -1,6 +1,7 @@
|
|||||||
image: alpine
|
image: alpine
|
||||||
package_dir: "/package"
|
package_dir: "/package"
|
||||||
steps:
|
steps:
|
||||||
- mkdir -p /package/etc/systemd/network
|
|
||||||
- mkdir -p /package/etc/dracut.conf.d
|
- mkdir -p /package/etc/dracut.conf.d
|
||||||
- cp -rfv conf/* /package/etc/dracut.conf.d
|
- mkdir -p /package/usr/lib/dracut/modules.d
|
||||||
|
- cp files/90-kairos-sysext.conf /package/etc/dracut.conf.d/90-kairos-sysext.conf
|
||||||
|
- cp -r files/90kairos-sysext /package/usr/lib/dracut/modules.d/90kairos-sysext
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
packages:
|
packages:
|
||||||
- name: "sysext"
|
- name: "kairos-sysext"
|
||||||
category: "dracut"
|
category: "dracut"
|
||||||
version: "0.9"
|
version: "1.0.0"
|
||||||
|
@ -1 +0,0 @@
|
|||||||
add_dracutmodules+=" systemd-sysext "
|
|
1
packages/dracut/sysext/files/90-kairos-sysext.conf
Normal file
1
packages/dracut/sysext/files/90-kairos-sysext.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
add_dracutmodules+=" kairos-sysext "
|
35
packages/dracut/sysext/files/90kairos-sysext/module-setup.sh
Normal file
35
packages/dracut/sysext/files/90kairos-sysext/module-setup.sh
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# This module tries to add systemd-sysext module to the initramfs if its in the system, otherwise it does nothing
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
# If the binary(s) requirements are not fulfilled the module can't be installed.
|
||||||
|
require_binaries systemd-sysext || return 1
|
||||||
|
# Check if the module files exists
|
||||||
|
# This is not normal but on ubuntu-22 the binary for sysext exists but the dracut module doesnt, so we
|
||||||
|
# need to do further checks before including it otherwise it will fail to build the initrd
|
||||||
|
files=( "${dracutbasedir}"/modules.d/??systemd-sysext )
|
||||||
|
[ "${#files[@]}" -ge 2 ] && return 1
|
||||||
|
if [ -d "${files[0]}" ]; then
|
||||||
|
echo "systemd-sysext"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
dinfo "module 'systemd-sysext' will not be installed, because module dir could not be found!"
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
installkernel() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
return 0
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user