bug: wwctl overlay edit creates new overlay file even when editor is quit without writing
We recently encountered a situation where wwctl overlay edit host etc/passwd.ww was run by mistake. The resultant vi session was quit with :q! in an attempt to quit without writing a new file. A new file was written regardless, populated with the templating boilerplate due to the .ww suffix. This resulted in undesirable behavior when the host overlay was later accidentally deployed. (#523)
Note: this does not occur for non-template overlay files.
If nothing is written out from the editor, no new overlay file should be written, similar to the end-result of a non-templated file. One potential implementation might be to write the boilerplate to a temporary file and inspect mtime and content? If neither mtime nor content has changed, don't write an overlay. (inspecting mtime is useful in case someone wants to just write out the boilerplate)