From 4ee0de9fb81615a91259e64a85b32e73e4a03985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 30 Sep 2014 00:36:53 +0200 Subject: [PATCH] updates-proxy-setup: support setting proxy for apt (#887) --- vm-systemd/misc-post.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/vm-systemd/misc-post.sh b/vm-systemd/misc-post.sh index d667080..82f7745 100755 --- a/vm-systemd/misc-post.sh +++ b/vm-systemd/misc-post.sh @@ -1,9 +1,19 @@ #!/bin/sh if [ -f /var/run/qubes-service/yum-proxy-setup -o -f /var/run/qubes-service/updates-proxy-setup ]; then - echo proxy=http://10.137.255.254:8082/ > /etc/yum.conf.d/qubes-proxy.conf + if [ -d /etc/apt/apt.conf.d ]; then + echo 'Acquire::http::Proxy "http://10.137.255.254:8082/;"' >> /etc/apt/apt.conf.d/01qubes-proxy + fi + if [ -d /etc/yum.conf.d ]; then + echo proxy=http://10.137.255.254:8082/ > /etc/yum.conf.d/qubes-proxy.conf + fi else - echo > /etc/yum.conf.d/qubes-proxy.conf + if [ -d /etc/apt/apt.conf.d ]; then + rm -f /etc/apt/apt.conf.d/01qubes-proxy + fi + if [ -d /etc/yum.conf.d ]; then + echo > /etc/yum.conf.d/qubes-proxy.conf + fi fi # Set IP address again (besides action in udev rules); this is needed by