Jump to content

kmyths

Active Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

kmyths's Achievements

Newbie

Newbie (1/14)

  1. Hey All, This is just a simple script I wrote to help troubleshoot, maybe someone will find it useful. It pings two IP addresses, then turns on or off the unused LAN/WAN LEDs based on the result. This code runs an infinite loop, DO NOT add directly to rc.local. #!/bin/sh # Turn LEDs on/off based on network connectivity # $LAN_HOST controls Lan LED, $WAN_HOST controls Wan LED # WAN_HOST="8.8.8.8" # Wan host to ping LAN_HOST="172.16.42.42" # Lan host to ping ################ WAN_LED="/sys/devices/platform/leds-gpio/leds/alfa:blue:wan/brightness" LAN_LED="/sys/devices/platform/leds-gpio/leds/alfa:blue:lan/brightness" while : ; do LAN_CHK=`ping -c 1 -w 4 $LAN_HOST | grep received | cut -d ' ' -f4` WAN_CHK=`ping -c 1 -w 4 $WAN_HOST | grep received | cut -d ' ' -f4` WAN_LED_CHK=`cat $WAN_LED` LAN_LED_CHK=`cat $LAN_LED` # Check Wan Connection if [ $WAN_CHK == 0 ] ; then if [ $WAN_LED_CHK == 1 ]; then echo 0 > $WAN_LED fi else if [ $WAN_LED_CHK == 0 ]; then echo 1 > $WAN_LED fi fi # Check Lan Connection if [ $LAN_CHK == 0 ] ; then if [ $LAN_LED_CHK == 1 ]; then echo 0 > $LAN_LED fi else if [ $LAN_LED_CHK == 0 ]; then echo 1 > $LAN_LED fi fi sleep 2 done
  2. Very nice, thanks telot. I've always used iptables to accomplish this, your way is much better. iptables -A INPUT -p icmp --imcp-type 8 -j DROP K.
  3. Hey guys, been a forum crawler for a while. Just got my mk IV today, but have been running a v2 for about a year. I had to share this, because I used to have the same problems. I discovered this a few months ago. The simplest way is to just change the wired interface in wicd preferences. You will be able to run pineapple.sh and still use network manager. HTH :) K.
×
×
  • Create New...