[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/shells management



On Sat, Sep 06, 2003 at 14:26:44 -0400, Karl Ramm wrote:

> >     Martin> and the entry in /etc/shells should be added again, since it was
> >     Martin> there when we begun. How does the postinst know that this is no
> >     Martin> upgrade? Why doesn't add-shell care for this, so the postinst
> >     Martin> can unconditionally run?
>
> add-shell is idempotent, so running
>
> add-shell /bin/bash3
> add-shell /bin/bash3
>
> results in only one /bin/bash3 in /etc/shells.
>
> So the postinst can run it unconditionally.

You missed my point:

On Fri, Aug 22, 2003 at 22:56:22 -0400, kcr@debian.org wrote:

> [...] So, if a package contains something that the maintainer thinks
> ought to be a valid login shell, it's postinst should, (on initial
                                                          ^^^^^^^^^^
> install only, to allow a sysadmin to take it out again), run:
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> /usr/sbin/add-shell /path/to/shell

My question is: How does the postinst know whether it is an "initial
install"? How does it know, whether the entry is missing because the
sysadmin took it out, or because it was removed when the package was
removed but not purged? In the latter case it should be added again,
but not in the first one.

Kind regards,

Martin



Reply to: