die Installation von Debian {7|8} mit einem den Paketquellen vorgeschalteten HTTP-Proxy haengt an mehreren Stellen.
1. Analog zum hier viewtopic.php?f=7&t=8769 geschildertem Verhalten, haengt die Installation, bevor der Debian-Installer gestartet wird. Im Proxy-Log sind keine Zugriffversuche zu erkennen. Das Problem ist, dass der in den Eigenschaften des OS-Setups eingetragene HTTP-Proxy nicht an die entsprechenden Stellen in den Python-Skripten durchgereicht wird.
In /var/lib/opsi/depot/debian8/debian8.py wird der Proxy zwar aus der Konfiguration ermittelt, 'versandet' dann aber. Das fuehrt dazu, dass der http request nach 'sources.list' fehlschlaegt. Loesungsansatz ist, den schon ermittelten Proxy an den http request zu uebergeben:
Code: Alles auswählen
root@opsiserver:/var/lib/opsi/depot/debian8# diff -up debian8.1.py debian8.py
--- debian8.1.py 2017-02-14 09:32:35.516012000 +0100
+++ debian8.py 2017-02-14 09:33:11.836012000 +0100
@@ -417,7 +417,7 @@ with open('%s/tmp/mnt/%s' % (target,opsi
myfile.write('cp /opsitmp/keyboard /target/etc/default/keyboard\n')
#myfile.write('chroot /target cp -a /etc/default/keyboard /tmp/\n')
#myfile.write('chroot /target cat /tmp/keyboard | sed s"/XKBLAYOUT=\".*/XKBLAYOUT=\"%s\"/" > /etc/default/keyboard\n' % language)
-sourcesList = requests.get('%s/sources.list' % online_repository)
+sourcesList = requests.get('%s/sources.list' % online_repository, proxies={'http': proxy})
if sourcesList.status_code == 200:
logger.notice(u"sources.list found")
if localDebianRepo:
2. Proxy in der preseed-Datei des Debian-Installers. In der preseed-Datei wird der Platzhalter der Proxyeinstellung, #@proxy_addr*#, mit dem Leerstring gepatcht. Der Grund ist, dass in /var/lib/opsi/depot/debian8/debian8.py diese Logik verdrahtet ist:
Code: Alles auswählen
if (proxy == ''):
do_proxy = 'true'
proxy_addr = proxy
else:
do_proxy = 'false'
proxy_addr = ''
Code: Alles auswählen
root@opsiserver:/var/lib/opsi/depot/debian8# diff -up debian8.1.cfg debian8.cfg
--- debian8.1.cfg 2016-11-16 14:04:58.000000000 +0100
+++ debian8.cfg 2017-02-13 16:39:42.200012000 +0100
@@ -127,7 +127,7 @@ d-i mirror/protocol string #@online_repo
d-i mirror/country string manual
d-i mirror/http/hostname string #@online_repository_base*#
d-i mirror/http/directory string #@online_repository_dir*#
-d-i mirror/http/proxy string #@proxy_addr*#
+d-i mirror/http/proxy string #@proxy*#
d-i live-installer/net-image string #@online_repository*#/install/filesystem.squashfs
# Suite to install.
Mit den Anpassungen laeuft die Debian-Installation an und benutzt den Proxy.
VG
hmw