Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 526 → Rev 527

/alcasar.sh
133,7 → 133,7
# On test le lien vers le routeur par default
IP_GW=`ip route list|grep ^default|cut -d" " -f3`
arp_reply=`/usr/sbin/arping -b -I$EXTIF -c1 -w2 $IP_GW|grep response|cut -d" " -f2`
if [[ $(expr $arp_reply) -eq 0 ]]
if [ $(expr $arp_reply) -eq 0 ]
then
echo "Échec"
echo "Le routeur de site ou la Box Internet ($IP_GW) ne répond pas."
170,12 → 170,12
##################################################################
init ()
{
if [ ! "$mode" = "update" ]
if [ "$mode" != "update" ]
then
# On affecte le nom d'organisme
ORGANISME=!
PTN='^[a-zA-Z0-9-]*$'
until [[ $(expr $ORGANISME : $PTN) -gt 0 ]]
until [ $(expr $ORGANISME : $PTN) -gt 0 ]
do
echo "Entrez le nom de votre organisme : "
echo -n "Enter the name of your organisation : "
313,7 → 313,7
echo "Par défaut, le plan d'adressage du réseau de consultation est : $CUSTOM_PRIVATE_NETWORK_MASK"
response=0
PTN='^[oOnN]$'
until [[ $(expr $response : $PTN) -gt 0 ]]
until [ $(expr $response : $PTN) -gt 0 ]
do
echo -n "Voulez-vous utiliser ce plan d'adressage (recommandé) (O/n)? : "
read response
322,7 → 322,7
then
CUSTOM_PRIVATE_NETWORK_MASK="0"
PTN='^\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\).\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\).\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\).\([01]\?[[:digit:]][[:digit:]]\?\|2[0-4][[:digit:]]\|25[0-5]\)/[012]\?[[:digit:]]$'
until [[ $(expr $CUSTOM_PRIVATE_NETWORK_MASK : $PTN) -gt 0 ]]
until [ $(expr $CUSTOM_PRIVATE_NETWORK_MASK : $PTN) -gt 0 ]
do
echo -n "Entrez un plan d'adressage au format CIDR (a.b.c.d/xx) : "
read CUSTOM_PRIVATE_NETWORK_MASK
834,7 → 834,6
radiusacctport 1813
uamserver https://$HOSTNAME/intercept.php
radiusnasid $HOSTNAME
papalwaysok
uamsecret $secretuam
coaport 3799
include $DIR_DEST_ETC/alcasar-uamallowed
1390,7 → 1389,7
echo -n "ALCASAR Version "; echo -n $actual_version ; echo " is already installed";
response=0
PTN='^[oOnNyY]$'
until [[ $(expr $response : $PTN) -gt 0 ]]
until [ $(expr $response : $PTN) -gt 0 ]
do
echo "Voulez-vous effectuer une mise à jour (O/n)? ";
echo -n "Do you want to update (Y/n)?";
1435,7 → 1434,7
fi
response=0
PTN='^[oOnN]$'
until [[ $(expr $response : $PTN) -gt 0 ]]
until [ $(expr $response : $PTN) -gt 0 ]
do
echo -n "Voulez-vous créer le fichier de conf de la version actuelle (0/n)? "
read response