##// END OF EJS Templates
Added: KEEP_APT_PROXY
drtyhlpr -
r538:782219f11ef8
parent child
Show More
@@ -48,6 +48,9 Set Debian packages server address. Choose a server from the list of Debian worl
48 ##### `APT_PROXY`=""
48 ##### `APT_PROXY`=""
49 Set Proxy server address. Using a local Proxy-Cache like `apt-cacher-ng` will speed-up the bootstrapping process because all required Debian packages will only be downloaded from the Debian mirror site once. If `apt-cacher-ng` is running on default `http://127.0.0.1:3142` it is autodetected and you don't need to set this.
49 Set Proxy server address. Using a local Proxy-Cache like `apt-cacher-ng` will speed-up the bootstrapping process because all required Debian packages will only be downloaded from the Debian mirror site once. If `apt-cacher-ng` is running on default `http://127.0.0.1:3142` it is autodetected and you don't need to set this.
50
50
51 ##### `KEEP_APT_PROXY`=false
52 Keep the APT_PROXY settings used in the bootsrapping process in the generated image.
53
51 ##### `APT_INCLUDES`=""
54 ##### `APT_INCLUDES`=""
52 A comma-separated list of additional packages to be installed by debootstrap during bootstrapping.
55 A comma-separated list of additional packages to be installed by debootstrap during bootstrapping.
53
56
@@ -16,7 +16,7 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 sed -i "s/ jessie/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
19 sed -i "s/ stretch/ ${RELEASE}/" "${ETC_DIR}/apt/sources.list"
20
20
21 # Upgrade package index and update all installed packages and changed dependencies
21 # Upgrade package index and update all installed packages and changed dependencies
22 chroot_exec apt-get -qq -y update
22 chroot_exec apt-get -qq -y update
@@ -1,8 +1,8
1 deb http://ftp.debian.org/debian jessie main contrib
1 deb http://ftp.debian.org/debian stretch main contrib
2 #deb-src http://ftp.debian.org/debian jessie main contrib
2 #deb-src http://ftp.debian.org/debian stretch main contrib
3
3
4 deb http://ftp.debian.org/debian/ jessie-updates main contrib
4 deb http://ftp.debian.org/debian/ stretch-updates main contrib
5 #deb-src http://ftp.debian.org/debian/ jessie-updates main contrib
5 #deb-src http://ftp.debian.org/debian/ stretch-updates main contrib
6
6
7 deb http://security.debian.org/ jessie/updates main contrib
7 deb http://security.debian.org/ stretch/updates main contrib
8 #deb-src http://security.debian.org/ jessie/updates main contrib
8 #deb-src http://security.debian.org/ stretch/updates main contrib
@@ -119,6 +119,7 NET_NTP_2=${NET_NTP_2:=""}
119 # APT settings
119 # APT settings
120 APT_PROXY=${APT_PROXY:=""}
120 APT_PROXY=${APT_PROXY:=""}
121 APT_SERVER=${APT_SERVER:="ftp.debian.org"}
121 APT_SERVER=${APT_SERVER:="ftp.debian.org"}
122 KEEP_APT_PROXY=${KEEP_APT_PROXY:=false}
122
123
123 # Feature settings
124 # Feature settings
124 ENABLE_PRINTK=${ENABLE_PRINTK:=false}
125 ENABLE_PRINTK=${ENABLE_PRINTK:=false}
@@ -675,13 +676,17 umount -l "${R}/sys"
675 rm -rf "${R}/run/*"
676 rm -rf "${R}/run/*"
676 rm -rf "${R}/tmp/*"
677 rm -rf "${R}/tmp/*"
677
678
679 # Clean up APT proxy settings
680 if [ "$KEEP_APT_PROXY" = false ] ; then
681 rm -f "${ETC_DIR}/apt/apt.conf.d/10proxy"
682 fi
683
678 # Clean up files
684 # Clean up files
679 rm -f "${ETC_DIR}/ssh/ssh_host_*"
685 rm -f "${ETC_DIR}/ssh/ssh_host_*"
680 rm -f "${ETC_DIR}/dropbear/dropbear_*"
686 rm -f "${ETC_DIR}/dropbear/dropbear_*"
681 rm -f "${ETC_DIR}/apt/sources.list.save"
687 rm -f "${ETC_DIR}/apt/sources.list.save"
682 rm -f "${ETC_DIR}/resolvconf/resolv.conf.d/original"
688 rm -f "${ETC_DIR}/resolvconf/resolv.conf.d/original"
683 rm -f "${ETC_DIR}/*-"
689 rm -f "${ETC_DIR}/*-"
684 rm -f "${ETC_DIR}/apt/apt.conf.d/10proxy"
685 rm -f "${ETC_DIR}/resolv.conf"
690 rm -f "${ETC_DIR}/resolv.conf"
686 rm -f "${R}/root/.bash_history"
691 rm -f "${R}/root/.bash_history"
687 rm -f "${R}/var/lib/urandom/random-seed"
692 rm -f "${R}/var/lib/urandom/random-seed"
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant