This file is indexed.

/usr/sbin/debian-edu-hwsetup is in debian-edu-config 1.702.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#!/bin/sh
#
# Executed during installation to implement hardware specific workarounds.

set -e

if [ -t 1 ] ; then
    MANUAL_RUN=true
else
    MANUAL_RUN=false
fi

info() {
    echo "info: $@" 1>&2
}

append_if_missing() {
    file="$1"
    string="$2"
    if [ -f "$file" ] && grep -q "$string" "$file" ; then
        :
    else
        (
            if [ -f "$file" ] ; then cat "$file" ; fi
	    echo "$string"
        ) > "$file.new" && mv "$file.new" "$file"
    fi
}

xorgconf_hp_mini_2133() {
    template=xserver-xorg/config/inputdevice/keyboard/layout
    keyboard="$(debconf-get-selections | grep $template | awk '{print $4}')"
    if [ -z "$keyboard" ] ; then keyboard=us ; fi
    info "Replacing /etc/X11/xorg.conf for HP Mini 2133 (keyboard $keyboard)"
    cat <<EOF > /etc/X11/xorg.conf
# From http://wiki.debian.org/InstallingDebianOn/HP/HP2133,
# inserted by debian-edu-hwsetup
Section "Files"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"XkbLayout"	"$keyboard"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizScrollDelta"	"0"
EndSection

Section "Device"
	Identifier	"Video Openchrome"
	Driver		"openchrome"
	BusID		"PCI:1:0:0"
	Screen		0
	Option		"ActiveDevice" "LCD,CRT"
	Option		"ForceLCD"
	Option		"SWCursor" "True"
EndSection

Section "Monitor"
	Identifier	"Monitor LCD"
	VertRefresh	50.00-100.00			# X11 discovery claim
	HorizSync	30.00-113.00			# X11 discovery claim
	DisplaySize	193 116				# Approximate
	UseModes	"HP-2133 LCD Modes"
	Option		"PreferredMode"		"1280x768-60.0"
	Option		"DPMS"
EndSection

Section "Modes"         # See also "HP-2133 Known Modes" at file end for others.
        Identifier      "HP-2133 LCD Modes"
        # Default mode "1024x600": 49.0 MHz, 37.3 kHz, 60.0 Hz
        Modeline "1280x768-60.0"   48.96  1280 1064 1168 1312  768 601 604 622 -hsync +vsync
        # Default mode "1024x512": 41.3 MHz, 31.9 kHz, 60.0 Hz
        Modeline "1024x512-60.0"   41.30  1024 1056 1160 1296  512 513 516 531 -hsync +vsync
        # Default mode "720x480": 26.7 MHz, 29.8 kHz, 60.0 Hz
        Modeline "720x480-60.0"   26.70  720 736 808 896  480 481 484 497 -hsync +vsync
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Monitor LCD"
	SubSection "Display"
		Modes  "1280x768" 
		Virtual 1280 768
		Depth  24
	EndSubSection
	Device		"Video Openchrome"
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard" "CoreKeyboard"
	InputDevice	"Configured Mouse" "CorePointer"
	InputDevice	"Synaptics Touchpad"
EndSection

Section "Extensions"
	Option		"Composite" "true"
	Option		"DAMAGE" "true"
EndSection
EOF
}

# Based on recipe from http://wiki.debian.org/iwlagn
install_wifi_iwlagn() {
    if lsmod | grep -q iwlagn ; then
	echo "info: Kernel module iwlagn already available, not need to enable it."
	return
    fi
    cat <<EOF | sed 's/^/error: /'
To get the wireless card working in this computer, the recipe 
from http://wiki.debian.org/iwlagn can be used to enable
the iwlagn kernel module.  These steps are needed 2010-02-01:

  echo 'deb http://www.backports.org/debian lenny-backports main contrib non-free' \
    >> /etc/apt/sources.list
  aptitude update
  aptitude -t lenny-backports install debian-backports-keyring
  aptitude update
  aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*-,,g') firmware-iwlwifi wireless-tools
  reboot

This will install a updated kernel from backports.org, which
need to be security patched manually by the system administrator.
EOF
}

remove_usplash() {
    hwinfo="$1"
    info "Removing usplash, not supported on this hardware ($hwinfo)"
    aptitude purge -y usplash
}

info "looking for PCI device specific overrides"
for id in $(lspci -n|awk '{print $3}' | tr a-f A-F) ; do
    case "$id" in
	# From http://wiki.debian.org/iwlagn 2010-01-22
	'8086:0082'|'8086:0083'|'8086:0084'|'8086:0085'|'8086:0086'|'8086:0087'|'8086:0088'|'8086:0089'|'8086:4229'|'8086:422B'|'8086:422C'|'8086:4230'|'8086:4232'|'8086:4235'|'8086:4236'|'8086:4237'|'8086:4238'|'8086:4239'|'8086:423A'|'8086:423B'|'8086:423C'|'8086:423D')
	    install_wifi_iwlagn
	    ;;
        # 10DE:06EB nVidia card on Dell Latitude E6500, tested 2010-01-22
        # 1002:515E ATI Technologies Inc ES1000 on HP Proliant DL385 G6
	'10DE:06EB'|'1002:515E')
	    remove_usplash "PCI id $id"
	    ;;
    esac
done

info "looking for DMI manufacturer and product specific overrides"
manufacturer=$(dmidecode -s system-manufacturer)
productname=$(dmidecode -s system-product-name)

case "$manufacturer" in
    Acer)
	case "$productname" in 
    	    AOA110)
    	        # During boot, vt-is-UTF8 hang and X fail to start
	        # when usplash is enabled on the Acer Aspire Onc used
	        # for testing at Debian Edu gatherings.  This is to
	        # work around that problem.  The issue might be
	        # related to
	        # https://bugs.launchpad.net/ubuntu/+source/usplash/+bug/403815
		remove_usplash "$manufacturer $productname"
		;;
	esac
	;;
    'Hewlett-Packard')
	case "$productname" in 
    	    'HP 2133')
		# Avoid white on white console.  See
		# http://wiki.debian.org/InstallingDebianOn/HP/HP2133
		# http://morethan.org/mini-note/xorg-mini.html
		append_if_missing /etc/default/acpi-support \
		    'SAVE_VBE_STATE=false'
		# LCD screen lack DDC information and require
		# xorg.conf to work properly.
		# Special xorg.conf file is not needed for Squeeze
		#xorgconf_hp_mini_2133
		;;
	esac
	;;
esac