postinst 824 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. ldconfig
  22. #
  23. # If there is no /etc/apt/sources.list then create a default
  24. #
  25. if [ ! -f /etc/apt/sources.list ]; then
  26. create_apt_conf
  27. else
  28. check_apt_conf
  29. fi
  30. esac