postinst 807 B

12345678910111213141516171819202122232425262728293031323334353637
  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. cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list
  12. }
  13. check_apt_conf ()
  14. {
  15. true
  16. # this is for future expansion
  17. }
  18. #DEBHELPER#
  19. case "$1" in
  20. configure)
  21. #
  22. # If there is no /etc/apt/sources.list then create a default
  23. #
  24. if [ ! -f /etc/apt/sources.list ]; then
  25. create_apt_conf
  26. else
  27. check_apt_conf
  28. fi
  29. esac