postinst 880 B

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