#!/bin/bash

#	FarSync X21 driver for Linux (generic HDLC interface version)
#
#	PVC interface down script for 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-rh
#	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

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

CONFIG=$1
source_config

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

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


# Perform standard post down work
if [ "$retcode" = "0" ]
then
	/etc/sysconfig/network-scripts/ifdown-post $CONFIG
fi

exit $retcode

#
#	Revision History
#	$Log: ifdown-pvc-rh,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
#	
#
