Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generic network package valid for all flavors #476

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/dracut/kairos-network/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
image: alpine
package_dir: "/package"
steps:
- mkdir -p /package/etc/dracut.conf.d
- mkdir -p /package/usr/lib/dracut/modules.d/
- cp files/90-kairos-network.conf /package/etc/dracut.conf.d/90-kairos-network.conf
- cp -r files/90kairos-network /package/usr/lib/dracut/modules.d/90kairos-network
5 changes: 5 additions & 0 deletions packages/dracut/kairos-network/collection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
packages:
- name: "kairos-network"
category: "dracut"
version: "1.0.0"
description: "package for initramfs network modules"
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
omit_dracutmodules+=" systemd-networkd "
add_dracutmodules+=" network-legacy "
add_dracutmodules+=" kairos-network "
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
# This module selects the proper network module to be used by dracut
# while avoiding using systemd-networkd
# This helps it be more generic and work on all kairos flavors easily without having
# to specify the network module directly in our framework packages list

# called by dracut
check() {
return 255
}

# called by dracut
depends() {
is_qemu_virtualized && echo -n "qemu-net "

for module in network network-legacy; do
if dracut_module_included "$module"; then
network_handler="$module"
break
fi
done

if [ -z "$network_handler" ]; then
if check_module "network-legacy"; then
network_handler="network-legacy"
else
network_handler="network"
fi
fi
echo "kernel-network-modules $network_handler"
return 0
}

# called by dracut
installkernel() {
return 0
}

# called by dracut
install() {
dracut_need_initqueue
}
5 changes: 0 additions & 5 deletions packages/dracut/network-legacy-compat/build.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions packages/dracut/network-legacy-compat/collection.yaml

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions packages/dracut/network-legacy/build.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions packages/dracut/network-legacy/collection.yaml

This file was deleted.