Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1528 → Rev 1529

/scripts/alcasar-conf.sh
115,7 → 115,7
$SED "/blacklists\/ip/d" $DIR_UPDATE/etc/alcasar-bl-categories; $SED "/^ip/d" $DIR_UPDATE/etc/alcasar-bl-categories-enabled
# BL and WL are now dynamically built in "/usr/local/share"
rm -rf $DIR_UPDATE/etc/alcasar-dnsfilter-enabled $DIR_UPDATE/etc/alcasar-dnsfilter-available
# Bing et Youtube are addes to the safesearching system
# Bing et Youtube are added to the safesearching system
Bing=`grep bing $DIR_UPDATE/urlregexplist | wc -l`
if [ $Bing -ne "1" ]; then
SafeSearch=`grep ^\"\(\^http\:\/\/ $DIR_UPDATE/urlregexplist | wc -l`
135,18 → 135,16
EOF
fi
fi
# la variable YOUTUBE_ID est déclarée dans le fichier de conf
# YOUTUBE_ID variable added in the conf file
YOUTUBE_ID=`grep ^YOUTUBE_ID $CONF_FILE | cut -d"=" -f2`
YOUTUBE_ID=${YOUTUBE_ID:="-1"}
if [ $YOUTUBE_ID = "-1" ]; then
echo "YOUTUBE_ID=ABCD1234567890abcdef" >> $CONF_FILE
fi
# copie du fichier de config de dnsmasq
# DNSMASQ conf file
cp /etc/sysconfig/dnsmasq $DIR_UPDATE
# copie du fichier de conf modifié
# ALCASAR conf file
cp $CONF_FILE $DIR_UPDATE/etc/
# le répertoire "ISO" est remplacé par "system_backup" suite à la suppression de "mondoarchive" (V2.5)
rm -rf /var/Save/ISO
# création de l'archive et copie dans le répertoire WEB associé
cd /tmp
tar -cf alcasar-conf.tar conf/
/scripts/alcasar-urpmi.sh
40,7 → 40,6
}
# extract the current Mageia version and hardware architecture (i586 ou X64)
fic=`cat /etc/product.id`
unknown_os=0
old="$IFS"
IFS=","
set $fic
49,46 → 48,17
if [ "`echo $i|grep distribution|cut -d'=' -f1`" == "distribution" ]
then
DISTRIBUTION=`echo $i|cut -d"=" -f2`
unknown_os=`expr $unknown_os + 1`
fi
if [ "`echo $i|grep version|cut -d'=' -f1`" == "version" ]
then
CURRENT_VERSION=`echo $i|cut -d"=" -f2`
unknown_os=`expr $unknown_os + 1`
fi
if [ "`echo $i|grep arch|cut -d'=' -f1`" == "arch" ]
then
ARCH=`echo $i|cut -d"=" -f2`
unknown_os=`expr $unknown_os + 1`
fi
done
IFS="$old"
if [[ ( $unknown_os != 3 || "$DISTRIBUTION" != "Mageia" ) && ( "$CURRENT_VERSION" != "4" ) ]]
then
if [ $Lang == "fr" ]
then
echo "L'installation ou la mise @ jour d'ALCASAR ne peut pas être réalisée."
echo "Le système d'exploitation doit être remplacé (Mageia4)"
else
echo "The automatic update of ALCASAR can't be performed."
echo "The OS must be replaced (Mageia4)"
fi
if [ -e /tmp/alcasar-conf.tar.gz ]
then
echo
if [ $Lang == "fr" ]
then
echo "1 - Récupérez le fichier de configuration actuel (/tmp/alcasar-conf.tar.gz)."
echo "2 - Installez Linux-Mageia4 (cf. doc d'installation)"
echo "3 - copiez le fichier 'alcasar-conf.tar.gz' dans le répertoire '/tmp' avant de lancer l'installation d'ALCASAR"
else
echo "1 - Retrieve the configuration file (/tmp/alcasar-conf.tar.gz)"
echo "2 - Install Linux-Mageia4 (cf. installation doc)"
echo "3 - Copy the file 'alcasar-conf.tar.gz' in the folder '/tmp' before launching the installation of ALCASAR"
fi
fi
exit 1
fi
# We prefer wget than curl
urpmi --no-verify-rpm --auto conf/rpms/$ARCH/wget*.rpm
# Set the RPM repository (if not already set)