]> git.saurik.com Git - apt-legacy.git/blame - test/networkless-install-fixes/test.sh
Figured out a much simpler fix for the cache rebuild performance.
[apt-legacy.git] / test / networkless-install-fixes / test.sh
CommitLineData
00ec24d0
JF
1#!/bin/sh
2
3OPTS="-o Dir::Etc::sourcelist=./sources.test.list -o Acquire::http::timeout=20"
4
5# setup
6unset http_proxy
7iptables --flush
8
9echo "No network at all"
10ifdown eth0
11time apt-get update $OPTS 2>&1 |grep system
12ifup eth0
13echo ""
14
15echo "no working DNS (port 53 DROP)"
16iptables -A OUTPUT -p udp --dport 53 -j DROP
17time apt-get update $OPTS 2>&1 |grep system
18iptables --flush
19echo ""
20
21echo "DNS but no access to archive.ubuntu.com (port 80 DROP)"
22iptables -A OUTPUT -p tcp --dport 80 -j DROP
23time apt-get update $OPTS 2>&1 |grep system
24iptables --flush
25echo ""