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

Re: /etc/shells management



On Sat, 6 Sep 2003 20:56:00 +0200, Martin Godisch <martin@godisch.de> said: 

> 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.

case "$1" in
  configure)
    # Configure this package.  If the package must prompt the user for
    # information, do it here.
    # There are three sub-cases:
    if test "${2+set}" != set; then
      # We're being installed by an ancient dpkg which doesn't remember
      # which version was most recently configured, or even whether
      # there is a most recently configured version.
      :

    elif test -z "$2" -o "$2" = "<unknown>"; then
      # The package has not ever been configured on this system, or was
      # purged since it was last configured.
      :

    else
      # Version $2 is the most recently configured version of this
      # package.
      :

    fi ;;


	manoj
-- 
Men ought to know that from the brain and from the brain only arise
our pleasures, joys, laughter, and jests as well as our sorrows,
pains, griefs and tears.  ...  It is the same thing which makes us mad
or delirious, inspires us with dread and fear, whether by night or by
day, brings us sleeplessness, inopportune mistakes, aimless anxieties,
absent-mindedness and acts that are contrary to habit... Hippocrates
"The Sacred Disease"
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: