#!/bin/bash
# 01050-i740.sh
# Intel i740

XORG_CONF="$1"

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

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

case "$PCI_DEVICE_ID" in
    7800)
        ;;
    *)
        exit 1
        ;;
esac

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

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