]>
Commit | Line | Data |
---|---|---|
2d18d44e AL |
1 | #! /bin/sh |
2 | ||
3 | # apt postinst, based liberally on James Troup's gpm postinst | |
4 | # Copyright (C) 1998, Ben Gertzfield <che@debian.org> | |
5 | ||
6 | # This program is free software; you can redistribute it and/or modify | |
7 | # it under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 2 of the License, or | |
9 | # (at your option) any later version. | |
10 | ||
11 | set -e | |
12 | ||
13 | create_apt_conf () | |
14 | { | |
15 | echo "/etc/apt/sources.list does not exist; creating a default setup." | |
16 | ||
17 | cat > /etc/apt/sources.list <<EOF | |
314037ba | 18 | # See sources.list(5) for more information, especialy |
2d18d44e | 19 | # Remember that you can only use http, ftp or file URIs |
314037ba | 20 | # CDROMs are managed throught the apt-cdrom tool. |
159eedd1 AL |
21 | # Proxy configuration is covered through environment variables or |
22 | # | |
2d18d44e AL |
23 | deb http://http.us.debian.org/debian stable main contrib non-free |
24 | deb http://non-us.debian.org/debian-non-US stable non-US | |
159eedd1 | 25 | deb http://security.debian.org stable updates |
2d18d44e | 26 | |
b0b22e13 AL |
27 | # Uncomment if you want the apt-get source function to work |
28 | #deb-src http://http.us.debian.org/debian stable main contrib non-free | |
29 | #deb-src http://non-us.debian.org/debian-non-US stable non-US | |
30 | ||
2d18d44e AL |
31 | EOF |
32 | } | |
33 | ||
34 | check_apt_conf () | |
35 | { | |
36 | true | |
37 | # this is for future expansion | |
38 | } | |
39 | ||
40 | case "$1" in | |
41 | configure) | |
ed3dc989 | 42 | ldconfig |
2d18d44e AL |
43 | # |
44 | # If there is no /etc/apt/sources.list then create a default | |
45 | # | |
46 | if [ ! -f /etc/apt/sources.list ]; then | |
47 | create_apt_conf | |
48 | echo | |
49 | echo "If you wish to change the default sites from which APT fetches Debian" | |
50 | echo "packages, please edit the file /etc/apt/sources.list." | |
51 | else | |
52 | check_apt_conf | |
53 | fi | |
396f4b08 AL |
54 | if [ -f /usr/sbin/dhelp_parse ]; then |
55 | /usr/sbin/dhelp_parse -a /usr/doc/apt | |
56 | fi | |
2d18d44e AL |
57 | esac |
58 | ||
0b5c85b5 | 59 | #DEBHELPER# |