]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
feat(systemd-bsod): dracut module for systemd-bsod
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Sun, 14 Apr 2024 18:21:23 +0000 (14:21 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sat, 20 Apr 2024 18:19:03 +0000 (14:19 -0400)
modules.d/01systemd-bsod/module-setup.sh [new file with mode: 0755]
test/container/Dockerfile-Arch
test/container/Dockerfile-Fedora-latest

diff --git a/modules.d/01systemd-bsod/module-setup.sh b/modules.d/01systemd-bsod/module-setup.sh
new file mode 100755 (executable)
index 0000000..91b28d7
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+# This file is part of dracut.
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Prerequisite check(s) for module.
+check() {
+    # If the binary(s) requirements are not fulfilled the module can't be installed
+    require_binaries "$systemdutildir"/systemd-bsod || return 1
+
+    # Return 255 to only include the module, if another module requires it.
+    return 255
+}
+
+# Module dependency requirements.
+depends() {
+    # This module has external dependency on other module(s).
+    echo systemd-journald
+    # Return 0 to include the dependent module(s) in the initramfs.
+    return 0
+}
+
+# Install the required file(s) for the module in the initramfs.
+install() {
+    inst_multiple \
+        "$systemdsystemunitdir"/systemd-bsod.service \
+        "$systemdsystemunitdir"/initrd.target.wants/systemd-bsod.service \
+        "$systemdutildir"/systemd-bsod
+
+    inst_libdir_file "libqrencode.so*"
+}
index 2cf7b757bc4c2d424dded83ffd341581e11c2457..78bbc916ad3cb6ae5117c54eef8a47793af1f7ee 100644 (file)
@@ -37,6 +37,7 @@ RUN pacman --noconfirm -Syu \
     pigz \
     plymouth \
     qemu \
+    qrencode \
     rng-tools \
     sbsigntools \
     shellcheck \
index 8279a8c0222dbf564f4408423f4e49535d8f6ae0..137f412ce9d32fbbcc2c45e2d9311baace279d45 100644 (file)
@@ -3,6 +3,7 @@ FROM registry.fedoraproject.org/fedora:latest
 # Install needed packages for the dracut CI container
 RUN dnf -y install --setopt=install_weak_deps=False \
     asciidoc \
+    astyle \
     bash-completion \
     biosdevname \
     bluez \
@@ -27,6 +28,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
     iproute \
     iputils \
     iscsi-initiator-utils \
+    jq \
     kbd \
     kernel \
     kmod-devel \
@@ -49,6 +51,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
     pcsc-lite \
     pigz \
     qemu-system-x86-core \
+    qrencode \
     rng-tools \
     rpm-build \
     sbsigntools \