#!/bin/sh
# Begin $network_devices/services/pppoe

# Based upon lfs-bootscripts-1.12 $network_devices/if{down,up}
# Rewritten by Nathan Coulson <nathan@linuxfromscratch.org>
# Adapted for pppoe by DJ Lucas <dj@lucasit.com>

#$LastChangedBy: alexander $
#$Date: 2008-03-15 07:04:07 +0000 (Sat, 15 Mar 2008) $

. /etc/sysconfig/rc
. $rc_functions
. $IFCONFIG

case "$2" in
        up)
                boot_mesg "Bringing up the PPPoE interface..."
                loadproc -p /var/run/ppp-${1}.pid pppd call pppoe ${1} linkname ${1} ${PPP_OPTS}
        ;;

        down)
                boot_mesg "Bringing down the PPPoE interface..."
                killproc -p /var/run/ppp-${1}.pid pppd
        ;;

        *)
                echo "Usage: $0 {up|down}"
                exit 1
        ;;
esac

# End $network_devices/services/pppoe
