This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
rc2007-soccer/source/ct-Bot/contrib/flash_n_fuse/loadusbtty.sh
2007-02-11 18:32:03 +00:00

14 lines
262 B
Bash

#!/bin/sh
# create ttyUSB0 device and load module for cp2101
if [ ! -c /dev/ttyUSB0 ]; then
mknod -m 666 /dev/ttyUSB0 c 188 0
fi
if [ -z $(lsmod |cut -d" " -f1 |grep "cp2101") ]; then
modprobe cp2101 >/dev/null 2>&1
if [ $? != "0" ]; then
exit 1;
fi
fi