-
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.
Add generic network package valid for all flavors
Signed-off-by: Itxaka <[email protected]>
- Loading branch information
Showing
9 changed files
with
55 additions
and
21 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 |
---|---|---|
@@ -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 |
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,5 @@ | ||
packages: | ||
- name: "kairos-network" | ||
category: "dracut" | ||
version: "1.0.0" | ||
description: "package for initramfs network modules" |
2 changes: 1 addition & 1 deletion
2
...legacy/conf/90-kairos-network-legacy.conf → ...iros-network/files/90-kairos-network.conf
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,2 +1,2 @@ | ||
omit_dracutmodules+=" systemd-networkd " | ||
add_dracutmodules+=" network-legacy " | ||
add_dracutmodules+=" kairos-network " |
42 changes: 42 additions & 0 deletions
42
packages/dracut/kairos-network/files/90kairos-network/modules-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,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 | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
packages/dracut/network-legacy-compat/conf/90-kairos-network-legacy-compat.conf
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.