#!/bin/sh
(
echo this is postinst of /tmp/RTM8000-Enabler-1.1/files.
chown root.root /lib/modules/*/pcmcia/serial_cs.o
chmod 775 /lib/modules/*/pcmcia/serial_cs.o
depmod
modprobe serial_cs
lsmod
if fgrep 'manfid: 0x0279, 0x950b' /home/etc/pcmcia/serial.opts
  then echo serial.opts already patched
  else echo patch serial.opts
    echo '' >>/home/etc/pcmcia/serial.opts
    echo '( cardctl ident $SOCKET | fgrep "manfid: 0x0279, 0x950b" ) && SERIAL_OPTS="$SERIAL_OPTS uart 16550A"' >>/home/etc/pcmcia/serial.opts
fi
/sbin/cardmgr&
cardctl insert 0
lsmod
date
echo done.
) >>/tmp/RTM8000-Enabler.ipk.log 2>&1
