Hi Clint,

On Mon, Jul 05, 2021 at 11:46:58AM +0000, Clint Adams wrote:
> Why not put the shells.d directory in /etc so that dpkg's conffiles
> handling can be used to preserve admin changes?

Thank you for looking at it in more detail. It's good question with a
non-obvious answer.

TL;DR: Been there. Done that. Don't repeat.

The issue is that files in /etc are conffiles. conffiles persist on
package removal. Say you remove ksh. /etc/shells.d/ksh would be kept and
thus /etc/shells would continue to contain ksh. Only on purge of ksh,
ksh would disappear from /etc/shells. That's not what we want here.

Beyond this, I've been burned by dpkg bugs when it comes to activating
triggers on conffiles. See #88010 for the long story. Possibly they're
all sorted out now. Maybe not.

Also keep in mind that an administrator modifying a conffile will not
automatically invoke the trigger. So you may end up with a situation
where you modify /etc/shells.d/ksh. It doesn't take effect. You install
screen and suddenly /etc/shells is updated with your modification
performed months ago.

Let me know if something else pops up.

Helmut

Reply via email to