blob: 9f281df63d77f4dd684c80f233bece22d4d284ef [file] [log] [blame] [raw]
#!/bin/bash
# Copyright (C) 2000-2006 SWsoft. All rights reserved.
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
test -f @PKGCONFDIR@/vz.conf || exit 1
test -f @PKGLIBDIR@/scripts/vps-functions || exit 1
test -f /etc/init.d/functions && . /etc/init.d/functions
## SuSE distro
if [ -f /etc/sysconfig/network/scripts/functions ]; then
vznet=$1
else
CONFIG=${1}
if ! . "$CONFIG"; then
echo "can't source interface config $CONFIG" >&2
exit 1
fi
vznet=$DEVICE
fi
echo "Shutting down interface $vznet: "
ip link set $vznet down