From 7cea09711ae4bfbb622d716edfa70c2429563b54 Mon Sep 17 00:00:00 2001 From: Olivier MEDOC Date: Tue, 12 Jul 2016 11:38:14 +0200 Subject: [PATCH] archlinux: fix update-proxy-configs to use pacman.d drop-ins --- network/update-proxy-configs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/network/update-proxy-configs b/network/update-proxy-configs index 3264f6d..b850a5f 100755 --- a/network/update-proxy-configs +++ b/network/update-proxy-configs @@ -108,6 +108,22 @@ $PROXY_CONF_ENTRY EOF fi +# Pacman (archlinux) also +if [ -d /etc/pacman.d ]; then + if [ -n "$PROXY_ADDR" ]; then + cat > /etc/pacman.d/01-qubes-proxy.conf < %o +EOF + else + rm -r /etc/pacman.d/01-qubes-proxy.conf + fi +fi + # DNF configuration doesn't support including other files if [ -e /etc/dnf/dnf.conf ]; then update_conf /etc/dnf/dnf.conf "$PROXY_CONF_ENTRY" @@ -117,8 +133,3 @@ fi if [ -e /etc/PackageKit/PackageKit.conf ]; then update_conf /etc/PackageKit/PackageKit.conf "ProxyHTTP=$PROXY_ADDR" fi - -# Pacman (archlinux) also -if [ -e /etc/pacman.conf ]; then - update_conf /etc/pacman.conf "XferCommand = http_proxy=$PROXY_ADDR /usr/bin/curl -C - -f %u > %o" -fi