Compare commits

...

5 Commits

2 changed files with 11 additions and 16 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "beowulf/scripts"]
path = beowulf/scripts
url = git@git.devuan.org:cyteen/automate.git
url = ssh://git@git.ring-zero.co.uk:10022/scripts/automate.git

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() {
@ -472,7 +464,7 @@ install-custscripts() {
#!/bin/sh
cd /var/tmp/automate
for script in ${custom_scripts}; do
touch \${$script:r}.log
touch \${script}.log
bash \$script
done
apt-get --yes --force-yes -f install
@ -514,8 +506,8 @@ enable_apt-proxy() {
cat << EOF | sudo tee ${strapdir}/addproxy
#!/bin/sh
cat > /etc/apt/apt.conf.d/02proxy' << 'FOE'
Acquire::http { Proxy \"${apt_proxy}\"; };
cat > /etc/apt/apt.conf.d/02proxy << 'FOE'
Acquire::http { Proxy "${apt_proxy}"; };
FOE
EOF
@ -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
}