postinst 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/sh -e
  2. # This script can be called in the following ways:
  3. #
  4. # After the package was installed:
  5. # <postinst> configure <old-version>
  6. #
  7. #
  8. # If prerm fails during upgrade or fails on failed upgrade:
  9. # <old-postinst> abort-upgrade <new-version>
  10. #
  11. # If prerm fails during deconfiguration of a package:
  12. # <postinst> abort-deconfigure in-favour <new-package> <version>
  13. # removing <old-package> <version>
  14. #
  15. # If prerm fails during replacement due to conflict:
  16. # <postinst> abort-remove in-favour <new-package> <version>
  17. case "$1" in
  18. configure|triggered)
  19. sed -re \
  20. "/\[uruk-text\]/ {
  21. N;
  22. s/(title=Uruk ).*\$/\1$(lsb_release -rs)/
  23. }" /lib/plymouth/themes/uruk-text/uruk-text.plymouth.in \
  24. > /lib/plymouth/themes/uruk-text/uruk-text.plymouth
  25. update-alternatives \
  26. --install /lib/plymouth/themes/text.plymouth text.plymouth \
  27. /lib/plymouth/themes/uruk-text/uruk-text.plymouth 50
  28. if which update-initramfs >/dev/null 2>&1
  29. then
  30. update-initramfs -u
  31. fi
  32. ;;
  33. abort-upgrade|abort-deconfigure|abort-remove)
  34. ;;
  35. *)
  36. echo "$0 called with unknown argument \`$1'" 1>&2
  37. exit 1
  38. ;;
  39. esac
  40. exit 0