#!/bin/sh
#
# code by ngc1927

# crea i nodi
mknod /dev/ttyUSB0 c 188 0 && echo "node /dev/ttyUSB0 created" >/tmp/start_tmp
chmod 666 /dev/ttyUSB0 && echo "set new permission for /dev/ttyUSB0"  >>/tmp/start_tmp

# carica i moduli
MODULES="/var/lib/modules/usb-serial"
insmod $MODULES/usbserial.ko && echo "module usbserial.ko loaded" >>/tmp/start_tmp
for MOD in `ls $MODULES | sed -e "s/\([^. ]*\).*/\1/"`
do
	insmod $MODULES/$MOD.ko && echo "module: $MOD ..loaded" >>/tmp/start_tmp
done

# lo mette in autoavvio
[ -e /var/etc/SifTeam/bin/S80usbserial.sh ] && cp -a /var/etc/SifTeam/bin/S80usbserial.sh /var/etc/rcS.d/

# visualizza il resoconto
cat /tmp/start_tmp
rm -f /tmp/start_tmp

exit 0
