qubes-core-agent.prerm 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. # prerm script for core-agent-linux
  3. #
  4. # see: dh_installdeb(1)
  5. set -e
  6. # The prerm script may be called in the following ways:
  7. # * <prerm> 'remove'
  8. # * <old-prerm> 'upgrade' <new-version>
  9. # * <conflictor's-prerm> 'remove' 'in-favour' <package> <new-version>
  10. # * <deconfigured's-prerm> 'deconfigure' 'in-favour' <package-being-installed>
  11. # <version> [removing conflicting-package version]
  12. #
  13. # The package whose prerm is being called will be at least "Half-Installed".
  14. # All package dependencies will at least be "Half-Installed" and will have
  15. # previously been configured and not removed. If there was no error, all
  16. # dependencies will at least be "Unpacked", but these actions may be called in
  17. # various error states where dependencies are only "Half-Installed" due to a
  18. # partial upgrade.
  19. #
  20. # * <new-prerm> 'failed-upgrade' <old-version>
  21. #
  22. # Called during error handling when prerm upgrade fails. The new package
  23. # will not yet be unpacked, and all the same constraints as for preinst
  24. # upgrade apply.
  25. #
  26. # For details, see http://www.debian.org/doc/debian-policy/ or
  27. # https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html or
  28. # the debian-policy package
  29. if [ "$1" = "remove" ] ; then
  30. for init in plymouth-shutdown \
  31. prefdm \
  32. splash-manager \
  33. start-ttys \
  34. tty ; do
  35. dpkg-divert --divert /etc/init/${init}.conf.qubes-disabled --package qubes-core-agent --remove /etc/init/${init}.conf
  36. done
  37. dpkg-divert --divert /etc/init/serial.conf.qubes-orig --package qubes-core-agent --remove /etc/init/serial.conf
  38. fi
  39. # dh_installdeb will replace this with shell code automatically
  40. # generated by other debhelper scripts.
  41. #DEBHELPER#
  42. exit 0
  43. # vim: set ts=4 sw=4 sts=4 et :