File: ifupdown.bug-script

package info (click to toggle)
ifupdown 0.8.45
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 952 kB
  • sloc: ansic: 2,779; sh: 899; perl: 513; makefile: 90
file content (47 lines) | stat: -rw-r--r-- 686 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

# reportbug expects output on fd 3
exec 1>&3 2>&3

# Dump /etc/network/interfaces

echo "--- /etc/network/interfaces:"
if [ ! -e /etc/network/interfaces ]; then
	echo "MISSING"
	echo
	exit 0
fi

cat /etc/network/interfaces
echo

# Check for source and source-directory stanzas

(while read stanza value; do
	dump() {
		echo "--- $1:"
		cat $1
		echo
	}

	case "$stanza" in
		source)
			dump "$value"
			;;
		source-directory)
			for file in "$value"/*; do
				if [ -e "$file" ]; then
					dump "$file"
				fi
			done
			;;
		*)
			;;
	esac
done) < /etc/network/interfaces

# List if-*.d scripts

echo "--- up and down scripts installed:"
LANG= ls -l /etc/network/if-*.d
echo