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