BASH
28
run usb ether
Guest on 29th April 2022 03:06:03 PM
#!/bin/sh
rmmod ohci-hcd 2>/dev/null
ifconfig usb0 down
rmmod g_ether g_file_storage 2>/dev/null
rmmod pxa27x_udc
sleep 1
modprobe pxa27x_udc
modprobe g_ether
ifconfig usb0 192.168.129.201 netmask 255.255.255.0 up
route add -host 192.168.129.1 usb0
route add default gw 192.168.129.1
echo "Please connect remote and press Enter"
read DUMMY
scp -p -i /home/sb/.ssh/id_rsa sb@192.168.129.1:/etc/resolv.conf /etc/resolv.conf
#cat >/etc/resolv.conf <<EOF
#search suse.cz
#nameserver 10.20.0.2
#nameserver 10.20.0.8
#EOF