##// END OF EJS Templates
Update 11-apt.sh
burnbabyburn -
r660:26d7d085a1b0
parent child
Show More
@@ -1,44 +1,44
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 if [ "$APT_INCLUDES_LATE" = "bullseye" ] || [ "$APT_INCLUDES_LATE" = "testing" ] ; then
19 if [ "$RELEASE" = "bullseye" ] || [ "$RELEASE" = "testing" ] ; then
20 sed -i "s,stretch\\/updates,testing-security," "${ETC_DIR}/apt/sources.list"
20 sed -i "s,stretch\\/updates,testing-security," "${ETC_DIR}/apt/sources.list"
21 else
21 else
22 sed -i "s/ stretch/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
22 sed -i "s/ stretch/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
23 fi
23 fi
24
24
25 # Upgrade package index and update all installed packages and changed dependencies
25 # Upgrade package index and update all installed packages and changed dependencies
26 chroot_exec apt-get -qq -y update
26 chroot_exec apt-get -qq -y update
27 chroot_exec apt-get -qq -y -u dist-upgrade
27 chroot_exec apt-get -qq -y -u dist-upgrade
28
28
29 # Install additional packages
29 # Install additional packages
30 if [ "$APT_INCLUDES_LATE" ] ; then
30 if [ "$APT_INCLUDES_LATE" ] ; then
31 chroot_exec apt-get -qq -y install "$(echo "$APT_INCLUDES_LATE" |tr , ' ')"
31 chroot_exec apt-get -qq -y install "$(echo "$APT_INCLUDES_LATE" |tr , ' ')"
32 fi
32 fi
33
33
34 # Install Debian custom packages
34 # Install Debian custom packages
35 if [ -d packages ] ; then
35 if [ -d packages ] ; then
36 for package in packages/*.deb ; do
36 for package in packages/*.deb ; do
37 cp "$package" "${R}"/tmp
37 cp "$package" "${R}"/tmp
38 chroot_exec dpkg --unpack /tmp/"$(basename "$package")"
38 chroot_exec dpkg --unpack /tmp/"$(basename "$package")"
39 done
39 done
40 fi
40 fi
41
41
42 chroot_exec apt-get -qq -y -f install
42 chroot_exec apt-get -qq -y -f install
43
43
44 chroot_exec apt-get -qq -y check
44 chroot_exec apt-get -qq -y check
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant