[xen-tools-discuss] setup-apt should ignore backup files in apt.conf.d

Simon Hürlimann simon.huerlimann at huerlisi.ch
Fri Jan 2 00:37:49 CET 2009


Hi again

The 20-setup-apt hooks in edgy,debian, and dapper are too keen on
finding a Proxy setting even when commented out or occuring in backup files.

Here's a possible fix:

#
#  Process any of the present apt-conf setup lines.
#
-for i in /etc/apt/apt.conf /etc/apt/apt.conf.d/* ; do
+for i in /etc/apt/apt.conf $(run-parts --list /etc/apt/apt.conf.d) ; do

-        grep -i HTTP::Proxy $i >${prefix}/etc/apt/apt.conf.d/proxy-guess
+        grep -v '^//' $i | grep -i HTTP::Proxy
>>${prefix}/etc/apt/apt.conf.d/proxy-guess
[...]
done

Simon





More information about the xen-tools-discuss mailing list