#!/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@linuxfromscratch.org>

#$LastChangedBy: dj $
#$Date: 2011-11-27 05:08:57 +0000 (Sun, 27 Nov 2011) $

. /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
