my pi runs heedlessly
i cant ssh in to fix the eth0 being down as eth0 need to be working to use ssh
I managed to hook up a old school av cable/keyboard to trouble shoot it this timeCode:[Wed Apr 30 11:03:57 2014] usb 1-1.1: USB disconnect, device number 3 [Wed Apr 30 11:03:57 2014] smsc95xx 1-1.1:1.0 eth0: unregister 'smsc95xx' usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet [Wed Apr 30 11:03:57 2014] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup [Wed Apr 30 11:03:57 2014] Indeed it is in host mode hprt0 = 00001101 [Wed Apr 30 11:03:57 2014] usb 1-1: reset high-speed USB device number 2 using dwc_otg [Wed Apr 30 11:03:57 2014] Indeed it is in host mode hprt0 = 00001101 [Wed Apr 30 11:03:58 2014] usb 1-1.1: new high-speed USB device number 4 using dwc_otg [Wed Apr 30 11:03:58 2014] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00 [Wed Apr 30 11:03:58 2014] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [Wed Apr 30 11:03:58 2014] smsc95xx v1.0.4 [Wed Apr 30 11:03:59 2014] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:a2:68:54 [Wed Apr 30 11:03:59 2014] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup [Wed Apr 30 11:04:00 2014] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1 [Wed Apr 30 11:04:00 2014] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
i got it working again with ifup eth0
i then made this script a root cron job that runs every minute
Code:#!/bin/sh checkNIC(){ echo $(/sbin/ifconfig "$nic" | grep 10.0.0.25 | wc -l) } fixNIC(){ echo "Attempting to fix NIC" /usr/sbin/service networking restart sleep 2 echo "Attempting to configure $nic" /sbin/ifup "$nic" echo "Attempt Complete" sleep 13 } nic="eth0" if [ $(checkNIC) -ne 1 ];then log="/var/log/fixnic" if [ -f "$log.stop" ];then exit fi echo "BEGIN------$(date)------" >> "$log" dmesg -T | tail -15 >> "$log" echo "---------------------------------------------" >> "$log" mpc >> "$log" echo "END------------------------------------------" >> "$log" echo "$(fixNIC)" >> "$log" if [ $(checkNIC) -ne 1 ];then echo "---TRY_2---" >> "$log" /usr/sbin/service networking start >> "$log" echo "$(fixNIC)" >> "$log" if [ $(checkNIC) -ne 1 ];then touch "$log.stop" fi fi fi



Adv Reply



Bookmarks