1 Answer

I want to make sure I understand you correctly. If /etc/sysctl.conf does not exist, you want to create it. If /etc/sysctl.conf does exist, you want to rewrite the content to match your source. Is that correct?

If so, then you can re-write your requirements to be, "make /etc/sysctl.conf match my source."