#!/bin/sh conffile="/etc/X11/xorg.conf" case "$1" in install) . /etc/init.d/rc.functions modprobe fglrx || exit 2 $0 uninstall if grep -q "Layout-MLD" $conffile; then sed "s/\(Section \+\"Device\"\)/\1\n Driver \"fglrx\"/g" -i $conffile fi ;; uninstall) sed "/Driver \+\"fglrx\"/d" -i $conffile ;; depend) echo xorg echo lib-pango ;; *) echo "Usage $0 {install | uninstall | depend}" >&2 exit 1 esac