←back to thread

134 points todsacerdoti | 1 comments | | HN request time: 0s | source
Show context
johnisgood ◴[] No.44602632[source]
It is not the same, but I do use "chattr +i" on a file (which applies the immutable attribute) on Linux to a file that otherwise would have been overwritten by programs that do not give a damn whether I want it to or not, and in my case it was easier to just make that file immutable, mainly: /etc/resolv.conf.
replies(3): >>44602842 #>>44603152 #>>44604893 #
claviola ◴[] No.44604893[source]
Are you using systemd-resolved? If so, it's actually a symlink to /run/systemd/resolve/stub-resolv.conf, and all you need to do to manage it yourself is to turn it into a regular file of your own. This is explained in the admittedly very long commented out text above the actual directives.
replies(1): >>44605663 #
1. johnisgood ◴[] No.44605663[source]
No, it is a runit-based system. I think the issue was related to resolvconf + package updates overwriting the file.

That said, I am sure your comment will be useful to some!