Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions dracut/50flatcar-network/afterburn-network-kargs.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ PartOf=systemd-networkd.service
# For extra safety
ConditionKernelCommandLine=|coreos.oem.id=vmware
ConditionKernelCommandLine=|flatcar.oem.id=vmware
ConditionKernelCommandLine=|coreos.oem.id=proxmoxve
ConditionKernelCommandLine=|flatcar.oem.id=proxmoxve
ConditionKernelCommandLine=|coreos.oem.id=kubevirt
ConditionKernelCommandLine=|flatcar.oem.id=kubevirt

OnFailure=emergency.target
OnFailureJobMode=replace-irreversibly

Expand Down
3 changes: 3 additions & 0 deletions dracut/50flatcar-network/parse-ip-for-networkd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ function mask2cidr() {
echo $bits
}

nameserver=$(getarg nameserver=)

# Check ip= lines
# XXX Would be nice if we could errorcheck ip addresses here as well
for p in $(getargs ip=); do
Expand Down Expand Up @@ -128,6 +130,7 @@ for p in $(getargs ip=); do
[ -n "$gw" ] && echo "Gateway=$gw" >> $_net_file
[ -n "$dns1" ] && echo "DNS=$dns1" >> $_net_file
[ -n "$dns2" ] && echo "DNS=$dns2" >> $_net_file
[ -n "$nameserver" ] && echo "DNS=$nameserver" >> $_net_file
echo '[Address]' >> $_net_file
[ -n "$ip" ] && echo "Address=$ip/${cidr:-24}" >> $_net_file
[ -n "$srv" ] && echo "Peer=$srv" >> $_net_file
Expand Down