#!/bin/bash
# Network Interface Configuration System
# Copyright (c) 1996-2005 Red Hat, Inc. all rights reserved.
#
# This software may be freely redistributed under the terms of the GNU
# public license.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

. /etc/init.d/functions

cd /etc/sysconfig/network-scripts
. network-functions

[ -f ../network ] && . ../network

CONFIG=${1}

need_config ${CONFIG}

source_config

if [ -n "$IPADDR" -a -n "$TAPDEV" ]
then
  expand_config  
fi

test -z "$PORT" && PORT="/var/run/$DEVNAME.ctl"
test -z "$TYPE" && TYPE="switch"
test -z "$MODE" && MODE=0755
test -z "$NUMPORTS" && NUMPORTS=32

PIDFILE="/var/run/$DEVNAME.pid"

if [ -f $PIDFILE ]
then
  kill `cat $PIDFILE`
  rm -f $PIDFILE
fi
