#!/bin/sh

if [ "$METHOD" = "ppp" ]; then
  if [ -n "$IF_PROVIDER" ]; then
    if grep -q "^plugin.*rp-pppoe.so" /etc/ppp/peers/$IF_PROVIDER; then
      PPPOE_IFACE=`grep ^eth /etc/ppp/peers/$IF_PROVIDER`
      if [ -n "$PPPOE_IFACE" ]; then
        ifconfig $PPPOE_IFACE up
      fi
    fi
  fi
fi
