Skip to content

Commit

Permalink
POC: test kairos-sysext
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Oct 10, 2023
1 parent 7eeeb55 commit d5fe09c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 7 deletions.
1 change: 1 addition & 0 deletions 90-kairos-sysext.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_dracutmodules+=" kairos-sysext "
26 changes: 26 additions & 0 deletions 90kairos-sysext/module-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/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 255 to only include the module, if another module requires it.
return 255
}

# called by dracut
depends() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries systemd-sysext || return 1
echo "systemd-sysext"
return 0
}

# called by dracut
installkernel() {
return 0
}

# called by dracut
install() {
return 0
}
3 changes: 3 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ framework:
END
END

COPY 90-kairos-sysext.conf /framework/etc/dracut.conf.d/90-kairos-sysext.conf
COPY 90kairos-sysext /framework/usr/lib/dracut/modules.d/90kairos-sysext

SAVE ARTIFACT --keep-own /framework/ framework

build-framework-image:
Expand Down
7 changes: 0 additions & 7 deletions framework-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,21 @@ flavors:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
opensuse-tumbleweed-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
opensuse-leap:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
opensuse-leap-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
alpine-arm-rpi:
- common-packages
Expand Down Expand Up @@ -159,9 +155,6 @@ ubuntu-kernel:
packages:
- distro-kernels/ubuntu
- distro-initrd/ubuntu
systemd-latest:
packages:
- dracut/sysext
repositories:
- &kairos
name: "kairos"
Expand Down

0 comments on commit d5fe09c

Please sign in to comment.