blob: 3d02b66f7fbefec44d731bc1a74080c25607d401 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#! /bin/bash
# Let's make sure that we have correct http proxy settings.
if [ -x $target/usr/share/debian-edu-config/tools/update-proxy-from-wpad ]; then
chroot $target /usr/share/debian-edu-config/tools/update-proxy-from-wpad
fi
# The proxy settings should not have been written to /etc/environment.
# Let's export those settings to the current shell, so that cf-agent
# has them...
for line in $(cat $target/etc/environment | grep -v -E "^#.*" | grep -E ".+=.*"); do
export $line;
done
# Now let's assume, we have http_proxy, https_proxy and ftp_proxy set in our
# environment. We need to pass them on into the chroot...
echo http_proxy=$http_proxy
echo https_proxy=$https_proxy
echo ftp_proxy=$ftp_proxy
# d-e-c/cf.finalize expects this directory to exist for prep'ing desktop-profiles
# (FIXME: file d-e-c-bug)
mkdir -p $target/etc/xdg/menus
# d-e-c/cf.workarounds expects /etc/xdg/xfce4/panel/ to exist (FIXME: file d-e-c bug)
mkdir -p $target/etc/xdg/xfce4/panel/
# Do the conversion of the vanilla Debian system to a Debian Edu system
chroot $target /usr/bin/cf-agent -I -D installation
# fetch DebianEdu root CA certs
chroot $target /usr/share/debian-edu-config/tools/fetch-rootca-cert
sed -i $target/etc/wgetrc \
-e "s@^http_proxy\s*=.*@http_proxy = $http_proxy@" \
-e "s@^https_proxy\s*=.*@https_proxy = $https_proxy@" \
-e "s@^ftp_proxy\s*=.*@ftp_proxy = $ftp_proxy@" \
${NULL}
|