File: em8300.config

package info (click to toggle)
em8300 0.16.0-2
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k
  • size: 2,024 kB
  • ctags: 1,492
  • sloc: ansic: 11,554; sh: 3,849; perl: 1,353; makefile: 429
file content (99 lines) | stat: -rw-r--r-- 2,092 bytes parent folder | download
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/sh -e

. /usr/share/debconf/confmodule

db_version 2.0

db_capb backup

STATE=1

while [ $STATE -gt 0 ] && [ $STATE -le 6 ]; do
    case $STATE in
	1)
	    db_input high em8300/microcode/download || true
	    ;;

	2)
	    db_get em8300/microcode/download
	    if [ "$RET" = "false" ] && [ -d /usr/share/em8300 ] && [ -n "`find /usr/share/em8300 -type f`" ]; then
		files=`find /usr/share/em8300 -type f -printf ", %P"`
		db_subst em8300/microcode/file files ${files}
		db_input high em8300/microcode/file || true
	    fi
	    ;;

	3)
	    if [ -d /usr/share/em8300 ]; then
		prio=high
		if [ -z "`find /usr/share/em8300 -type f`" ]; then
		    db_fget em8300/microcode/delete_olddir seen
		    if [ "$RET" = "false" ]; then
			prio=medium
			db_set em8300/microcode/delete_olddir true
		    fi
		else
		    db_get em8300/microcode/download
		    if [ "$RET" = "false" ]; then
			db_get em8300/microcode/file
			if [ "$RET" = "`find /usr/share/em8300 -type f -printf %f`" ]; then
			    db_fget em8300/microcode/delete_olddir seen
			    if [ "$RET" = "false" ]; then
				prio=medium
				db_set em8300/microcode/delete_olddir true
			    fi
			fi
		    fi
		fi
		db_input $prio em8300/microcode/delete_olddir || true
	    fi
	    ;;

	4)
	    db_input high em8300/chipset || true
	    ;;
		    
	5)
	    db_beginblock
	    db_input medium em8300/options || true
	    db_get em8300/chipset
	    if [ "$RET" = "adv717x" ]; then
		db_input medium em8300/adv717x/options || true
	    else
		db_input medium em8300/bt865/options || true
	    fi
	    db_endblock
	    ;;

	6)
	    if [ -c /dev/.devfsd ]; then
		# devfs active
		:
	    elif [ -d /dev/.udevdb ] || [ -d /dev/.udev ]; then
		# udeb active
		:
	    else
		# static /dev
		if [ ! -c /dev/em8300 ] && [ ! -c /dev/em8300-0 ]; then
		    db_input medium em8300/no_device_creation
		fi
	    fi
	    ;;
    esac

    if db_go; then
	STATE=`expr $STATE + 1`
    else
	RETURN_CODE=$?
	case $RETURN_CODE in
	    "30")
		if [ $STATE -gt 1 ]; then
		    STATE=`expr $STATE - 1`
		fi
		;;
	    *)
		exit $RETURN_CODE
		;;
	esac
    fi
done