You can't use `sed -i` on /etc/sysctl.d/*.conf
neutronscott opened this issue · comments
This clobbers the symlink and ruins everything!
The whole thing is a mess. You use grep to find a pattern, then see if it was found, and then a while read loop to read it back in, just to have sed add a hash mark. sed can search for things too. the whole thing probably equivalent to sed 's/^\s*kernel\.core_pattern.*/# &/' "$f"
but add a --follow-symlinks
in there I guess.
@neutronscott would you like to propose a PR to improve this? I would be happy to review it.
I can try that. I was at work and unable to. Also, sorry about the tone, work is like that sometimes.