Skip to content
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
22 changes: 22 additions & 0 deletions dracut/03flatcar-network/afterburn-network-kargs.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[Unit]
Description=Afterburn Initrd Setup Network Kernel Arguments
Documentation=https://coreos.github.io/afterburn/usage/initrd-network-cmdline/

# This service may produce additional kargs fragments,
# which are then consumed by dracut-cmdline(8).
DefaultDependencies=no
Before=dracut-cmdline.service systemd-networkd.service
PartOf=systemd-networkd.service
# For extra safety
ConditionKernelCommandLine=|coreos.oem.id=vmware
ConditionKernelCommandLine=|flatcar.oem.id=vmware
OnFailure=emergency.target
OnFailureJobMode=isolate

[Service]
ExecStart=/usr/bin/coreos-metadata exp rd-network-kargs --cmdline --default-value ''
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=systemd-networkd.service
6 changes: 6 additions & 0 deletions dracut/03flatcar-network/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ depends() {

# called by dracut
install() {
inst_multiple coreos-metadata

inst_multiple -o \
$systemdutildir/systemd-resolved \
$systemdsystemunitdir/systemd-resolved.service \
Expand All @@ -18,6 +20,9 @@ install() {
inst_simple "$moddir/network-cleanup.service" \
"$systemdsystemunitdir/network-cleanup.service"

inst_simple "$moddir/afterburn-network-kargs.service" \
"$systemdsystemunitdir/afterburn-network-kargs.service"

inst_simple "$moddir/10-nodeps.conf" \
"$systemdsystemunitdir/systemd-resolved.service.d/10-nodeps.conf"

Expand Down Expand Up @@ -56,4 +61,5 @@ install() {
systemctl --root "$initdir" disable systemd-networkd.socket

systemctl --root "$initdir" enable network-cleanup.service
systemctl --root "$initdir" enable afterburn-network-kargs.service
}