#!/bin/bash

#	FarSync X21 driver for Linux (generic HDLC interface version)
#
#	PVC interface down script for systems without Red Hat like network
#	config systems.
#
#	Copyright (C) 2001 FarSite Communications Ltd.
#	www.farsite.co.uk
#
#	This program is free software; you can redistribute it and/or
#	modify it under the terms of the GNU General Public License
#	as published by the Free Software Foundation; either version
#	2 of the License, or (at your option) any later version.
#
#	File:	ifdown-pvc-db
#	Author:	R.J.Dunlop	<bob.dunlop@farsite.co.uk>
#
#	Revision history at end of file
#

PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin

COMPNY_DIR=/etc/farsite
CONFIG_DIR=$COMPNY_DIR/farsync

cd ${CONFIG_DIR}

CONFIG=$1
. $CONFIG


# Take the interface down
ifconfig $DEVICE down
retcode=$?

# Delete the PVC from the master device
farutil $MASTERDEV delete $DLCI


exit $retcode

#
#	Revision History
#	$Log: ifdown-pvc-db,v $
#	Revision 1.2  2009/07/10 08:42:42  kevinc
#	Merging 1.09.04 and async branches
#	
#	Revision 1.1.1.1  2009/05/06 12:45:30  kevinc
#	
#
