]> git.proxmox.com Git - ifupdown-pve.git/blob - debian/ifupdown.bug-script
Squashed 'src/' content from commit c732260
[ifupdown-pve.git] / debian / ifupdown.bug-script
1 #!/bin/sh
2
3 # reportbug expects output on fd 3
4 exec 1>&3 2>&3
5
6 # Dump /etc/network/interfaces
7
8 echo "--- /etc/network/interfaces:"
9 if [ ! -e /etc/network/interfaces ]; then
10 echo "MISSING"
11 echo
12 exit 0
13 fi
14
15 cat /etc/network/interfaces
16 echo
17
18 # Check for source and source-directory stanzas
19
20 (while read stanza value; do
21 dump() {
22 echo "--- $1:"
23 cat $1
24 echo
25 }
26
27 case "$stanza" in
28 source)
29 dump "$value"
30 ;;
31 source-directory)
32 for file in "$value"/*; do
33 if [ -e "$file" ]; then
34 dump "$file"
35 fi
36 done
37 ;;
38 *)
39 ;;
40 esac
41 done) < /etc/network/interfaces
42
43 # List if-*.d scripts
44
45 echo "--- up and down scripts installed:"
46 LANG= ls -l /etc/network/if-*.d
47 echo