@@ -1,50 +1,54 | |||
|
1 | 1 | # |
|
2 | 2 | # Setup APT repositories |
|
3 | 3 | # |
|
4 | 4 | |
|
5 | 5 | # Load utility functions |
|
6 | 6 | . ./functions.sh |
|
7 | 7 | |
|
8 | 8 | # Install and setup APT proxy configuration |
|
9 | 9 | if [ -z "$APT_PROXY" ] ; then |
|
10 | 10 | install_readonly files/apt/10proxy "${ETC_DIR}/apt/apt.conf.d/10proxy" |
|
11 | 11 | sed -i "s/\"\"/\"${APT_PROXY}\"/" "${ETC_DIR}/apt/apt.conf.d/10proxy" |
|
12 | 12 | fi |
|
13 | 13 | |
|
14 | 14 | # Install APT sources.list |
|
15 | 15 | install_readonly files/apt/sources.list "${ETC_DIR}/apt/sources.list" |
|
16 | 16 | |
|
17 | 17 | # Use specified APT server and release |
|
18 | 18 | sed -i "s/\/ftp.debian.org\//\/${APT_SERVER}\//" "${ETC_DIR}/apt/sources.list" |
|
19 | 19 | |
|
20 | 20 | #Fix for changing path for security updates in testing/bullseye |
|
21 | 21 | if [ "$RELEASE" = "testing" ] ; then |
|
22 | 22 | sed -i "s,stretch\\/updates,testing-security," "${ETC_DIR}/apt/sources.list" |
|
23 | 23 | sed -i "s/ stretch/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list" |
|
24 | 24 | fi |
|
25 | 25 | |
|
26 | if [ "$ENABLE_NONFREE" = "true" ] ; then | |
|
27 | sed -i "s,main contrib,main contrib non-free," "${ETC_DIR}/apt/sources.list" | |
|
28 | fi | |
|
29 | ||
|
26 | 30 | if [ -z "$RELEASE" ] ; then |
|
27 | 31 | # Change release in sources list |
|
28 | 32 | sed -i "s/ stretch/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list" |
|
29 | 33 | fi |
|
30 | 34 | |
|
31 | 35 | # Upgrade package index and update all installed packages and changed dependencies |
|
32 | 36 | chroot_exec apt-get -qq -y update |
|
33 | 37 | chroot_exec apt-get -qq -y -u dist-upgrade |
|
34 | 38 | |
|
35 | 39 | # Install additional packages |
|
36 | 40 | if [ "$APT_INCLUDES_LATE" ] ; then |
|
37 | 41 | chroot_exec apt-get -qq -y install $(echo "$APT_INCLUDES_LATE" |tr , ' ') |
|
38 | 42 | fi |
|
39 | 43 | |
|
40 | 44 | # Install Debian custom packages |
|
41 | 45 | if [ -d packages ] ; then |
|
42 | 46 | for package in packages/*.deb ; do |
|
43 | 47 | cp "$package" "${R}"/tmp |
|
44 | 48 | chroot_exec dpkg --unpack /tmp/"$(basename "$package")" |
|
45 | 49 | done |
|
46 | 50 | fi |
|
47 | 51 | |
|
48 | 52 | chroot_exec apt-get -qq -y -f install |
|
49 | 53 | |
|
50 | 54 | chroot_exec apt-get -qq -y check |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant