From 6f5e2da03e5fd1af2200d2f55ca84647bc8d3626 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:04:40 +0200 Subject: Adding live-package 0.99.22-1. --- helpers/lh_configapt | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 helpers/lh_configapt (limited to 'helpers/lh_configapt') diff --git a/helpers/lh_configapt b/helpers/lh_configapt new file mode 100755 index 000000000..81ff23a90 --- /dev/null +++ b/helpers/lh_configapt @@ -0,0 +1,51 @@ +#!/bin/sh + +# lh_configapt.sh + +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 [ "${LIVE_RECOMMENDS}" = "yes" ] + then + echo "Aptitude::Recommends-Important \"true\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_recommends.conf + else + echo "Aptitude::Recommends-Important \"false\";" > "${LIVE_CHROOT}"/etc/apt/apt.conf.d/00make-live_recommends.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 -- cgit v1.2.3