#!/bin/sh
#
# /etc/sysconfig/network-scripts/ifup-atm
#

. /etc/sysconfig/atm
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network-scripts/.functions

if is_no "$BR2684" ; then
    echo "RFC1483/2684 Bridged protocols disabled - skipping. "
    exit 0
fi

CONFIG=$1
source_config

INTERFACE=$(echo "$DEVICE" | awk ' { gsub(/^nas/,NIL); print $0 } ')

br2684ctl -b -c $INTERFACE -a $ATMBR_PVC \
	`[ -n "$ATMBR_ENCAP" ] && echo " -e $ATMBR_ENCAP"` \
	`[ -n "$ATMBR_BUFSIZE" ] && echo " -s $ATMBR_BUFSIZE"` \
	2>/dev/null >/dev/null

sleep 1

echo "$!" > /var/run/br2684ctl-$DEVICE.pid

# This must be last line !
# vi:syntax=sh:tw=78:ts=8:sw=4

