Subversion Repositories ALCASAR

Rev

Rev 1394 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1394 Rev 1469
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 1394 2014-06-19 11:25:57Z richard $
2
# $Id: alcasar-uninstall.sh 1469 2014-10-30 21:58:47Z richard $
3
 
3
 
4
# alcasar-uninstall.sh
4
# alcasar-uninstall.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 201... Line 201...
201
sleep 1
201
sleep 1
202
 
202
 
203
#network
203
#network
204
echo -en "\n- network(9) : "
204
echo -en "\n- network(9) : "
205
hostname localhost
205
hostname localhost
-
 
206
CONF_FILE="/usr/local/etc/alcasar.conf"
206
EXTIF=`/sbin/ip route|grep default|cut -d" " -f5`
207
EXTIF=`grep ^EXTIF= $CONF_FILE|cut -d"=" -f2`				# EXTernal InterFace
207
INTIF=`/sbin/ip	link|grep '^[[:digit:]]:'|grep -v "lo\|$EXTIF"|cut -d" " -f2|tr -d ":"`
208
INTIF=`grep ^INTIF= $CONF_FILE|cut -d"=" -f2`				# INTernal InterFace
208
i=0
209
i=0
209
for nic in $EXTIF $INTIF
210
for nic in $EXTIF $INTIF
210
	do
211
	do
211
	i=`expr $i + 1`
212
	i=`expr $i + 1`
212
	/sbin/ifdown $nic
213
	/sbin/ifdown $nic