From: <abe...@us...> - 2011-12-08 16:04:15
|
Revision: 5298 http://astlinux.svn.sourceforge.net/astlinux/?rev=5298&view=rev Author: abelbeck Date: 2011-12-08 16:04:09 +0000 (Thu, 08 Dec 2011) Log Message: ----------- cleanup, remove old netmon script and configs Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf Removed Paths: ------------- branches/1.0/project/astlinux/target_skeleton/usr/sbin/netmon Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf =================================================================== --- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2011-12-08 15:57:02 UTC (rev 5297) +++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2011-12-08 16:04:09 UTC (rev 5298) @@ -783,18 +783,6 @@ ## I attempt to bring up the WAN interface. #WANDELAY=60 -## Netmon Support -## Netmon is a daemon that may run to monitor your internet connection. By default, -## it will try to ping the default gateway of the system. If the gateway cannot -## be reached, netmon will take the action you have defined in your action script. -## /etc/netmon.script and /mnt/kd/netmon.script - if they are executable. -## AND attempt to restart the connection, based on the connection type. -## You can also set the destination address manually, if you wish. -#NETMON=yes -#CHKHOST="www.google.com" -#CHKMETH="ICMP" # ICMP ping -#CHKMETH="ARP" #arping (remember uses ARP - layer 2) - ## ATM Interface ## Variables ATM_CIRCUIT[0-3] and ATM_PARAMS[0-3] correspond to nas[0-3] interface references ## For example, if nas0 is defined as an interface, ATM_CIRCUIT0 and ATM_PARAMS0 will Deleted: branches/1.0/project/astlinux/target_skeleton/usr/sbin/netmon =================================================================== --- branches/1.0/project/astlinux/target_skeleton/usr/sbin/netmon 2011-12-08 15:57:02 UTC (rev 5297) +++ branches/1.0/project/astlinux/target_skeleton/usr/sbin/netmon 2011-12-08 16:04:09 UTC (rev 5298) @@ -1,108 +0,0 @@ -#!/bin/sh - -PATH=/opt/bin:/opt/sbin:/usr/sbin:/bin:/usr/bin:/sbin:/usr/bin:/bin:/usr/sbin:/sbin - -. /etc/rc.conf - -IP=`which ip` - -if [ ! -x $IP ]; then - echo "You don't have iproute2 installed" 1>&2 - exit 1 -fi - -if [ -z "$NETMON" ]; then - exit -fi - -if [ -n "$CHKMETH" ]; then - METHOD="$CHKMETH" -else - METHOD=ICMP -fi - -if [ -n "$EXTIP" ]; then - CONTYPE=STATIC -else - CONTYPE=DHCP -fi - -if [ -n "$PPPOEIF" ]; then - CONTYPE=PPPOE - #force ICMP for PPPoE - METHOD=ICMP -fi - -#get default route -DEFAULT="`ip route | grep default`" -if [ -n "$DEFAULT" ]; then - DEST=`echo $DEFAULT | cut -d' ' -f3` -fi - -if [ -n "$CHKHOST" ]; then - DEST="$CHKHOST" -fi - -case $METHOD in - -ICMP) - ping -c 5 -q $DEST >/dev/null - ;; - -ARP) - arping -fq -c 5 $DEST - ;; - -esac - -STATUS=$? - -case $STATUS in - -0) - if [ -x /etc/netmon.script ]; then - /etc/netmon.script UP - fi - - if [ -x /mnt/kd/netmon.script ]; then - /mnt/kd/netmon.script UP - fi - ;; - -*) - # restart net connection - logger "netmon reports connection down - restarting" - - if [ -x /etc/netmon.script ]; then - /etc/netmon.script DOWN - fi - - if [ -x /mnt/kd/netmon.script ]; then - /mnt/kd/netmon.script DOWN - fi - - case $CONTYPE in - - DHCP) - killall udhcpc 2>/dev/null - sleep 2 - udhcpc -b -s /etc/udhcpc.script -i $EXTIF >/dev/null - ;; - - PPPOE) - killall pppd 2>/dev/null - sleep 2 - pppoe-start >/dev/null - ;; - - STATIC) - ;; - - *) - ;; - - esac - ;; - -esac - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |