postinst 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #! /bin/sh
  2. # apt postinst, based liberally on James Troup's gpm postinst
  3. # Copyright (C) 1998, Ben Gertzfield <che@debian.org>
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2 of the License, or
  7. # (at your option) any later version.
  8. set -e
  9. create_apt_conf ()
  10. {
  11. echo "/etc/apt/sources.list does not exist; creating a default setup."
  12. cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list
  13. }
  14. check_apt_conf ()
  15. {
  16. true
  17. # this is for future expansion
  18. }
  19. #DEBHELPER#
  20. case "$1" in
  21. configure)
  22. ldconfig
  23. #
  24. # If there is no /etc/apt/sources.list then create a default
  25. #
  26. if [ ! -f /etc/apt/sources.list ]; then
  27. create_apt_conf
  28. echo
  29. echo "If you wish to change the default sites from which APT fetches Debian"
  30. echo "packages, please edit the file /etc/apt/sources.list."
  31. else
  32. check_apt_conf
  33. fi
  34. esac