BASH   28

run usb ether

Guest on 29th April 2022 03:06:03 PM

  1. #!/bin/sh
  2. rmmod ohci-hcd 2>/dev/null
  3. ifconfig usb0 down
  4. rmmod g_ether g_file_storage 2>/dev/null
  5. rmmod pxa27x_udc
  6. sleep 1
  7. modprobe pxa27x_udc
  8. modprobe g_ether
  9. ifconfig usb0 192.168.129.201 netmask 255.255.255.0 up
  10. route add -host 192.168.129.1 usb0
  11. route add default gw 192.168.129.1
  12. echo "Please connect remote and press Enter"
  13. read DUMMY
  14. scp -p -i /home/sb/.ssh/id_rsa sb@192.168.129.1:/etc/resolv.conf /etc/resolv.conf
  15. #cat >/etc/resolv.conf <<EOF
  16. #search suse.cz
  17. #nameserver 10.20.0.2
  18. #nameserver 10.20.0.8
  19. #EOF

Raw Paste


Login or Register to edit or fork this paste. It's free.