/usr/sbin/debian-edu-hwsetup is in debian-edu-config 1.818+deb8u2.
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 | #!/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
}
add_nonfree_pkg() {
pkg="$1"
codename=$(debian-edu-current-codename)
info "Installing non-free package $pkg from $codename."
if ! LC_ALL=C apt-cache show $binpkg 2>&1 | \
grep -q 'E: No packages found' ; then
echo deb http://http.debian.net/debian $codename non-free \
> /etc/apt/sources.list.d/$pkg.list
chmod a+r /etc/apt/sources.list.d/$pkg.list
apt-get -qq update
fi
apt-get -qq install -y $pkg
}
acpi_backlight_vendor() {
append_if_missing /etc/default/grub \
'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT acpi_backlight=vendor"'
chmod a+r /etc/default/grub
update-grub
}
i915_invert_brightness() {
append_if_missing /etc/modprobe.d/i915.conf \
"options i915 invert_brightness=1"
chmod a+r /etc/modprobe.d/i915.conf
update-initramfs -u -k all
}
info "looking for PCI device specific overrides"
for modaliasfile in /sys/bus/pci/devices/*/modalias; do
modalias="$(cat $modaliasfile)"
case "$modalias" in
# Workaround for BTS report #710938 (Packard Bell EasyNote LV)
# See http://www.linlap.com/packard_bell_easynote_lv
pci:v00008086d00000156sv00001025sd00000688bc*)
acpi_backlight_vendor
;;
# Workaround for BTS report #714154 (Acer Aspire V3-771G model
# VA70)
pci:v00008086d00000166sv00001025sd00000686bc*)
i915_invert_brightness
;;
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
'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'
;;
esac
;;
esac
# Autodetect firmware packages and install them
isenkram-autoinstall-firmware
|