blob: 971d02e71c3a44e249f0f009c52db164834e98fb (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/bin/sh
# lh_configapt.sh <action>
case "${1}" in
apply-proxy)
# Configure ftp proxy
if [ -n "${LIVE_PROXY_FTP}" ]
then
echo "Acquire::ftp::Proxy \"${LIVE_PROXY_FTP}\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_ftp-proxy.conf
fi
# Configure http proxy
if [ -n "${LIVE_PROXY_HTTP}" ]
then
echo "Acquire::http::Proxy \"${LIVE_PROXY_HTTP}\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_http-proxy.conf
fi
;;
apply-recommends)
# Configure recommends
if [ ! -d "${LIVE_CHROOT}"/etc/apt/apt.conf.d ]
then
mkdir -p "${LIVE_CHROOT}"/etc/apt/apt.conf.d
fi
if [ "${LIVE_RECOMMENDS}" = "yes" ]
then
echo "Aptitude::Recommends-Important \"true\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf
else
echo "Aptitude::Recommends-Important \"false\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf
fi
;;
deapply-proxy)
# Deconfigure ftp proxy
if [ -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_ftp-proxy.conf ]
then
rm -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_ftp-proxy.conf
fi
# Deconfigure http proxy
if [ -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_http-proxy.conf ]
then
rm -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_http-proxy.conf
fi
;;
deapply-recommends)
# Deconfigure recommends
if [ -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_recommends.conf ]
then
rm -f "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_recommends.conf
fi
;;
esac
|