]> git.saurik.com Git - apt.git/blame - test/networkless-install-fixes/test.sh
merged from apt--mvo
[apt.git] / test / networkless-install-fixes / test.sh
CommitLineData
87123e9d
MV
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 ""