Subversion Repositories ALCASAR

Rev

Rev 986 | Rev 1015 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 986 Rev 994
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
# $Id: alcasar-conf.sh 986 2012-08-16 21:09:28Z franck $
2
# $Id: alcasar-conf.sh 994 2012-11-18 17:13:24Z franck $
3
 
3
 
4
# alcasar-conf.sh
4
# alcasar-conf.sh
5
# by REXY
5
# by REXY
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 279... Line 279...
279
		fi
279
		fi
280
# Effacement du répertoire d'update
280
# Effacement du répertoire d'update
281
		rm -rf $DIR_UPDATE
281
		rm -rf $DIR_UPDATE
282
		;;
282
		;;
283
	--apply|-apply)
283
	--apply|-apply)
284
		PTN="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/[012]?[0-9]\b"
284
		PTN="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([012]?[0-9]|3[0-2])\b"
285
		PRIVATE_IP_MASK=`grep PRIVATE_IP $CONF_FILE|cut -d"=" -f2`
285
		PRIVATE_IP_MASK=`grep PRIVATE_IP $CONF_FILE|cut -d"=" -f2`
286
		check=$(echo $PRIVATE_IP_MASK | egrep $PTN)
286
		check=$(echo $PRIVATE_IP_MASK | egrep $PTN)
287
		if [[ "$?" -ne 0 ]]
287
		if [[ "$?" -ne 0 ]]
288
		then 
288
		then 
289
			echo "Syntax error for PRIVATE_IP_MASK ($PRIVATE_IP_MASK)"
289
			echo "Syntax error for PRIVATE_IP_MASK ($PRIVATE_IP_MASK)"