diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/15coreos-network/coreos-copy-firstboot-network.sh b/overlay.d/05core/usr/lib/dracut/modules.d/15coreos-network/coreos-copy-firstboot-network.sh index 072dc7b487..ad24af2caf 100755 --- a/overlay.d/05core/usr/lib/dracut/modules.d/15coreos-network/coreos-copy-firstboot-network.sh +++ b/overlay.d/05core/usr/lib/dracut/modules.d/15coreos-network/coreos-copy-firstboot-network.sh @@ -26,10 +26,9 @@ if [ -n "$(ls -A ${initramfs_firstboot_network_dir} 2>/dev/null)" ]; then echo "info: copying files from ${initramfs_firstboot_network_dir} to ${initramfs_network_dir}" mkdir -p ${initramfs_network_dir} cp -v ${initramfs_firstboot_network_dir}/* ${initramfs_network_dir}/ - # If we make it to the realroot (successfully ran ignition) then - # clean up the files in the firstboot network dir - echo "R ${realroot_firstboot_network_dir} - - - - -" > \ - /run/tmpfiles.d/15-coreos-firstboot-network.conf + # Drop stamp file in /run to indicate that there are firstboot networking + # configuration files in /boot that should be cleaned up after Ignition. + touch /run/coreos-copy-firstboot-network.stamp else echo "info: no files to copy from ${initramfs_firstboot_network_dir}. skipping" fi