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