# hook addon for thin clients with chip Matrox MGA*

cat << EOF > ${DESTDIR}/scripts/tcos-bottom/15mga
#!/bin/sh
#
if [ "\$1" = "prereqs" ]; then
  exit 0
fi

quiet=n

. /scripts/functions
. /conf/tcos.conf
. /conf/tcos-run-functions

#ids="2064w 1064sg 2164w g100 g200 g400 g550"
test1=\$(get_vga_vendor "102B")


if [ "\$test1" != "1" ]; then
   # not in client with chip Matrox mga
   exit 0
else

   if [ -f /usr/lib/xorg/modules/drivers/mga_drv.so ]; then
     log_begin_msg "Loading support Matrox MGA driver"
         configurexorg --newsettings --xdriver=mga --outputfile=/etc/X11/xorg.conf 2>> /tmp/initramfs.debug
     log_end_msg \$?
   fi

fi


EOF
chmod +x ${DESTDIR}/scripts/tcos-bottom/15mga
