Description of problem: During investigation of https://bugzilla.redhat.com/show_bug.cgi?id=1840222 it was noted that the way we were prepending our DNS server to resolv.conf is not atomic. This means that if sed were interrupted for any reason, it might leave an empty resolv.conf on disk. We should instead write the sed output to a temp file and then move it into place, which should be atomic and not prone to races. Version-Release number of selected component (if applicable): 4.5 How reproducible: Unsure, not easily. Steps to Reproduce: Wait for NetworkManager dispatcher script to start running, then kill the sed before it completes (perhaps by hard rebooting the system). Actual results: /etc/resolv.conf will be empty because it was truncated by the redirection Expected results: /etc/resolv.conf is left in its original state Additional info: This is rather unlikely to happen, but since https://bugzilla.redhat.com/show_bug.cgi?id=1840222 appears to be a race bug we want to eliminate any possible races.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2409