Add enable/disable apt-proxy.

This commit is contained in:
Cyteen May 2020-03-16 03:06:57 +00:00
parent 84670c22ef
commit 695ed10fd6
1 changed files with 7 additions and 12 deletions

View File

@ -49,6 +49,8 @@ blend_preinst() {
else
notice "no blend-specific scripts found in ${blend_release_path}/automate"
fi
enable_apt-proxy
}
blend_postinst() {
@ -66,18 +68,8 @@ blend_postinst() {
install-custdebs || zerr
install-custscripts || zerr
## remove the apt-proxy if present
#if [ -f ${strapdir}/etc/apt/apt.conf.d/02proxy ]; then
# rm ${strapdir}/etc/apt/apt.conf.d/02proxy
#fi
## When changes are done to /root and we want those changes transfered
# to the live default user but not all future users we use a tmp skel
# with system skel copied in.
# rsync -avzP --no-o --no-g /etc/skel ${strapdir}/tmp/skel
# rsync -avzP --no-o --no-g ${strapdir}/root/ ${strapdir}/tmp/skel
blend_finalize || zerr
disable_apt-proxy
}
iso_write_isolinux_cfg() {
@ -529,7 +521,10 @@ disable_apt-proxy() {
cat << EOF | sudo tee ${strapdir}/delproxy
#!/bin/sh
sed '/^${apt_proxy}/d' /etc/apt/apt.conf.d/02proxy
#sed '/^${apt_proxy}/d' /etc/apt/apt.conf.d/02proxy
if [ -f /etc/apt/apt.conf.d/02proxy ]; then
rm /etc/apt/apt.conf.d/02proxy
fi
EOF
chroot-script delproxy || zerr
}