pve-headers.postinst.in 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #! /bin/sh
  2. # Abort if any command returns an error value
  3. set -e
  4. case "$1" in
  5. configure)
  6. # There are three sub-cases:
  7. if test "${2+set}" != set; then
  8. # We're being installed by an ancient dpkg which doesn't remember
  9. # which version was most recently configured, or even whether
  10. # there is a most recently configured version.
  11. :
  12. elif test -z "$2" -o "$2" = "<unknown>"; then
  13. # The package has not ever been configured on this system, or was
  14. # purged since it was last configured.
  15. :
  16. else
  17. # Version $2 is the most recently configured version of this
  18. # package.
  19. :
  20. fi ;;
  21. abort-upgrade)
  22. # Back out of an attempt to upgrade this package FROM THIS VERSION
  23. # to version $2. Undo the effects of "prerm upgrade $2".
  24. :
  25. ;;
  26. abort-remove)
  27. if test "$2" != in-favour; then
  28. echo "$0: undocumented call to \`postinst $*'" 1>&2
  29. exit 0
  30. fi
  31. # Back out of an attempt to remove this package, which was due to
  32. # a conflict with package $3 (version $4). Undo the effects of
  33. # "prerm remove in-favour $3 $4".
  34. :
  35. ;;
  36. abort-deconfigure)
  37. if test "$2" != in-favour -o "$5" != removing; then
  38. echo "$0: undocumented call to \`postinst $*'" 1>&2
  39. exit 0
  40. fi
  41. # Back out of an attempt to deconfigure this package, which was
  42. # due to package $6 (version $7) which we depend on being removed
  43. # to make way for package $3 (version $4). Undo the effects of
  44. # "prerm deconfigure in-favour $3 $4 removing $6 $7".
  45. :
  46. ;;
  47. *) echo "$0: didn't understand being called with \`$1'" 1>&2
  48. exit 0;;
  49. esac
  50. exit 0