Skip to content

Commit

Permalink
coreos-teardown-initramfs-network: remove state files on switch
Browse files Browse the repository at this point in the history
Remove the removal of the `/tmp/net.$1.did-setup` (used by
network-legacy dracut module) and start removing files under
/run/NetworkManager/ instead.
  • Loading branch information
dustymabe committed Mar 24, 2020
1 parent 0d219cb commit e0efb09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dracut/30ignition/coreos-teardown-initramfs-network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ down_interface() {
echo "info: taking down network device: $1"
ip link set $1 down
ip addr flush dev $1
rm -f -- /tmp/net.$1.did-setup
}

down_bonds() {
Expand Down Expand Up @@ -72,6 +71,10 @@ main() {
down_interfaces
# Propagate initramfs networking if needed
propagate_initramfs_networking
# Now that the configuration has been propagated (or not)
# clean it up so that no information from outside of the
# real root is passed on to NetworkManager in the real root
rm -rf /run/NetworkManager/
}

main

0 comments on commit e0efb09

Please sign in to comment.