#!/bin/bash
# 3000-ati-generic.sh
# match ATI cards through Xorg ati wrapper

XORG_CONF="$1"

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

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

logger -t retrodebian-xorg-autoconfig "Configuring ATI ati for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"

sed -i \
    -e "s|{DeviceDriver}|ati|g" \
    "$XORG_CONF" || exit 2

exit 0