Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 460 → Rev 461

/alcasar.sh
773,6 → 773,20
##########################################################################################
param_chilli ()
{
# modification du fichier d'initialisation
[ -e /etc/init.d/chilli.default ] || cp /etc/init.d/chilli /etc/init.d/chilli.default
# configuration d'eth1 (utile pour dnsmasq))
$SED "s?ifconfig.*?ifconfig \$HS_LANIF $PRIVATE_IP?g" /etc/init.d/chilli
# ajout de la fonction 'status' (utile pour la gestion du process)
$SED "/^.*functions/i. /etc/init.d/functions" /etc/init.d/chilli
$SED "/^[\t ]*stop)/i\ status)\n status chilli\n RETVAL=$?\n ;;\n" /etc/init.d/chilli
# insertion d'une tempo sur le 'restart' pour permettre à tun0 d'être libérée
$SED "/^[\t ]*\$0 start/i\ sleep 2" /etc/init.d/chilli
# suppression des fonctions 'writeconfig' et 'radiusconfig'
$SED "/writeconfig/d" /etc/init.d/chilli
$SED "/radiusconfig/d" /etc/init.d/chilli
# suppression de warning disgracieux
$SED "s?which start-stop-daemon?which start-stop-daemon 2>/dev/null?g" /etc/init.d/chilli
# création du fichier de conf
[ -e /etc/chilli.conf.default ] || cp /etc/chilli.conf /etc/chilli.conf.default
cat <<EOF > /etc/chilli.conf
1315,7 → 1329,7
echo -n "Do you want to update (Y/n)?";
read response
done
if [ "$response" = "o" ] || [ "$response" = "O" || [ "$response" = "y" ] || [ "$response" = "Y" ]
if [ "$response" = "o" ] || [ "$response" = "O" ] || [ "$response" = "y" ] || [ "$response" = "Y" ]
then
# On crée le fichier de conf de la version actuelle
chmod u+x $DIR_SCRIPTS/alcasar-conf.sh