#!/bin/bash
# 09720-glint-generic.sh
# 3Dlabs / GLINT / Permedia generic

XORG_CONF="$1"

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

case "$PCI_VENDOR_ID" in
    3d3d|104c)
        ;;
    *)
        exit 1
        ;;
esac

logger -t retrodebian-xorg-autoconfig "Configuring GLINT glint for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"

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