Re:rc.d belongs in libexec, not etc
by roelschroeven on Tuesday August 25, 2020 @05:12AM
(#24269457)
> So, if you're getting prompted, it's not just because there's a change to review, it's because there's a merge to review, and therefore it's because there was a local modification, and therefore clearly either you or some other sysadmin did in fact edit that file.
That's the way it should be, but while upgrading Debian I have very often seen prompts for files that were never touched locally.
You may have seen them for files that were automatically edited in some fashion (e.g., by another package's install script). IMO needing to do that is a low-grade bug.
These are not merge conflicts.
When you run etcupdate on NetBSD, the tool will diff your current /etc contents against the new versions shipped in the source tree or in the etc.txz distribution file -- and it will ask you to manually review every difference.
It doesn't matter if you have edited a file /etc by hand or not. If the currently-installed file differs from the new version in any way, you'll be asked about it.
Plenty of files that properly belong in /etc get edited rarely by the local sysadmin, perhaps more rarely than rc.d. (When was the last time you edited /etc/pam.d/ or /etc/gai.conf or /etc/protocols?) Yet they can be edited, and so they properly belong in /etc. If the local sysadmin doesn't actually touch them, an upgrade procedure should just upgrade them without prompting. (I assume the BSDs are clever enough for this.)
So, if you're getting prompted, it's not just because there's a change to review, it's because there's a merge to review, and therefore it's because there was a local modification, and therefore clearly either you or some other sysadmin did in fact edit that file. It is of course worth making it no longer necessary to edit it, such as by moving configuration to /etc/rc.conf for /etc/default/ or a service-specific /etc/foobard.conf, but that change needs to actually happen before you can call the rc script immutable, and once you do make that change, you no longer care if the rc script moves to libexec because you're no longer getting merge prompts.