Advertisement
Guest User

Faheemqwerty12

a guest
Aug 28th, 2008
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1. #!/bin/sh
  2. if [ `id -u` != 0 ] ; then
  3. #if not already root, call itself as root
  4.         exec sudo gainroot <<EOF
  5. exec $0 $*
  6. EOF
  7.         exit $?
  8. fi
  9. rmmod g_file_storage
  10. rmmod g_ether
  11. insmod /lib/modules/2.6.21-omap1/g_serial.ko use_acm=1 > /var/log/g_serial.log 2>&1
  12.  
  13. dmesg >> /var/log/g_serial.log
  14. ls -lR /dev >> /var/log/g_serial.log
  15.  
  16. lsmod >> /var/log/g_serial.log
  17. mknod /dev/ttygserial c 127 0
  18.  
  19. /sbin/getty   -n -f /var/log/g_serial.log -l /bin/sh 115200 /dev/ttygserial >> /var/log/g_serial.log 2>&1 &
  20. #rmmod g_serial
  21.  
  22. ps axf >> /var/log/g_serial.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement