#!/bin/bash

ETH=$1
#deb ETH="$IFACE"

DIR="/ips/ip2"

. /ips/setup/.config

if [ "$PPP" = "1" ]; then
   exit 0
fi


if [ "$ETH" != "$ANYDEV" -a "$ETH" != "br0" ]; then
    exit 0
fi


echo $0 $1


# system start
X=`ps ax |  grep qos- | grep -v grep`
if [ "$X" = "" ]; then
   exit 0
fi


if [ 1 = 0 ]; then


echo -n '.'
        /etc/rc.d/rc.qos-ips restart

echo -n '.'
        /etc/rc.d/rc.qos-rrd restart

echo -n '.'
        /etc/rc.d/rc.qos-qos restart

else

      touch /ips/setup/.IPSALL
      touch /ips/setup/.QOSALL
            
fi


if [ -d /proc/sys/net/ipv4 ]; then
   if [ -f /proc/sys/net/ipv4/ip_forward ]; then
      if [ `/bin/cat /proc/sys/net/ipv4/ip_forward` != 1 ]; then
          # rh /sbin/sysctl -w net.ipv4.ip_forward=1
          echo 1 > /proc/sys/net/ipv4/ip_forward
      fi
  fi
fi

exit 0
