#!/bin/bash
# 01000-i810.sh
# Intel i810/i815/830M/845G/852GM/855GM/865G family

XORG_CONF="$1"

[ -n "$XORG_CONF" ] || exit 2
[ -f "$XORG_CONF" ] || exit 2

[ "$PCI_VENDOR_ID" = "8086" ] || exit 1

case "$PCI_DEVICE_ID" in
    7121|7123|7125|1132|3577|3582|358e|2562|2572)
        ;;
    *)
        exit 1
        ;;
esac

logger -t retrodebian-xorg-autoconfig "Configuring Intel i810-family for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"

sed -i -e 's|{DeviceDriver}|i810|g' "$XORG_CONF" || exit 2
exit 0