-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make kairos-sysext be generic enough to include on all flavors
It will not install the systemd-sysext package if the binary is not there Signed-off-by: Itxaka <[email protected]>
- Loading branch information
Showing
5 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
image: alpine | ||
package_dir: "/package" | ||
steps: | ||
- mkdir -p /package/etc/systemd/network | ||
- mkdir -p /package/etc/dracut.conf.d | ||
- cp -rfv conf/* /package/etc/dracut.conf.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
packages: | ||
- name: "sysext" | ||
- name: "kairos-sysext" | ||
category: "dracut" | ||
version: "0.9" | ||
version: "1.0.0" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_dracutmodules+=" kairos-sysext " |
26 changes: 26 additions & 0 deletions
26
packages/dracut/sysext/files/90kairos-sysext/module-setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |