Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3189 → Rev 3190

/alcasar.sh
74,9 → 74,38
{
if [ $Lang == "fr" ]
then
cat $DIR_INSTALL/gpl-warning.fr.txt | more
echo " *******************************"
echo " **** Licence d'utilisation ****"
echo " *******************************"
echo
echo "ALCASAR est un logiciel libre"
echo
echo "Avant de l'installer, vous devez accepter les termes de sa licence 'GPL-V3'"
echo "Le descriptif de cette licence est disponible dans le fichier 'GPL-3.0.txt'"
echo "Une traduction française est disponible dans le fichier 'GPL-3.0.fr.txt'."
echo
echo "Les objectifs de cette licence sont de garantir à l'utilisateur :"
echo "- La liberté d'exécuter le logiciel, pour n'importe quel usage ;"
echo "- La liberté d'étudier et d'adapter le logiciel à ses besoins ;"
echo "- La liberté de redistribuer des copies ;"
echo "- L'obligation de faire bénéficier à la communauté les versions modifiées."
echo
else
cat $DIR_INSTALL/gpl-warning.txt | more
echo " *******************************"
echo " **** User License ****"
echo " *******************************"
echo
echo "ALCASAR is an open source software"
echo
echo "Before install it, you must understand and accept the license 'GPL-V3'"
echo "you can read this license in the file 'GPL-3.0.txt'"
echo
echo "The goals of this license are :"
echo "- the freedom of using the software ;"
echo "- the freedom of studying et adapting it for its own uses ;"
echo "- the freedom of redistributing copies of it ;"
echo "- the compulsory of giving the modify versions to the community"
echo
fi
response=0
PTN='^[oOyYnN]?$'
105,7 → 134,7
 
########################################################
## "system_testing" ##
## - Test Mageia version ##
## - Test distribution version ##
## - Test ALCASAR version (if already installed) ##
## - Test free space on /var (>10G) ##
## - Test Internet access ##
114,30 → 143,11
{
# Test of Mageia version
# extract the current Mageia version and hardware architecture (X86_64)
fic=`cat /etc/product.id`
unknown_os=0
old="$IFS"
IFS=","
set $fic
for i in "$@"
do
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
if [ "$ARCH" != "x86_64" ]
fic="/etc/product.id"
DISTRIBUTION_NAME=`cat $fic|cut -d"," -f2|cut -d"=" -f2`
DISTRIBUTION_VERSION=`cat $fic|cut -d"," -f4|cut -d"=" -f2`
DISTRIBUTION_ARCH=`cat $fic|cut -d"," -f7|cut -d"=" -f2`
if [ "$DISTRIBUTION_ARCH" != "x86_64" ]
then
if [ $Lang == "fr" ]
then echo "Votre architecture matérielle doit être en 64bits"
145,8 → 155,7
fi
exit 1
fi
IFS="$old"
if [[ ( $unknown_os != 3 ) || ("$DISTRIBUTION" != "Mageia" ) || (( "$CURRENT_VERSION" != "7" ) && ( "$CURRENT_VERSION" != "8" ))]]
if [[("$DISTRIBUTION_NAME" != "Mageia" ) || (( "$DISTRIBUTION_VERSION" != "8" ) && ( "$DISTRIBUTION_VERSION" != "9" ))]]
then
if [ -e /var/tmp/alcasar-conf.tar.gz ] # update
then
370,7 → 379,7
fi
echo -n "."
# Test if default GW is alive
arp_reply=`/usr/sbin/arping -b -I$EXTIF -c1 -w2 $PUBLIC_GATEWAY|grep response|cut -d" " -f2`
arp_reply=`LANG=en_US.UTF8 /usr/sbin/arping -b -I$EXTIF -c1 -w2 $PUBLIC_GATEWAY|grep response|cut -d" " -f2`
if [ "$(expr $arp_reply)" -eq 0 ]
then
if [ $Lang == "fr" ]
2224,7 → 2233,7
$SED "s?^GRUB_TIMEOUT=.*?GRUB_TIMEOUT=3?g" /etc/default/grub
$SED "s?^GRUB_DISTRIBUTOR=.*?GRUB_DISTRIBUTOR=ALCASAR?g" /etc/default/grub
[ -e /etc/mageia-release.default ] || cp /etc/mageia-release /etc/mageia-release.default
vm_vga=`lsmod | egrep -c "virtio|vmwgfx"` # test if in VM
vm_vga=`lsmod | grep -c -E "virtio|vmwgfx"` # test if in VM
if [ $vm_vga == 0 ] # is not a VM
then
cp -f $DIR_CONF/banner /etc/mageia-release # ALCASAR ASCII-Art
2369,7 → 2378,7
echo "/^kernel/" > /etc/urpmi/skip.list
echo "/^wkhtmltopdf/" >> /etc/urpmi/skip.list
echo "/^freeradius/" >> /etc/urpmi/skip.list
if [ `egrep '^exclude=' /etc/dnf/dnf.conf |wc -l` -eq "1" ]; then
if [ `grep -E '^exclude=' /etc/dnf/dnf.conf |wc -l` -eq "1" ]; then
$SED "s?^exclude=.*?exclude=kernel\* wkhtmltopdf freeradius?g" /etc/dnf/dnf.conf
else
echo "exclude=kernel* wkhtmltopdf freeradius" >> /etc/dnf/dnf.conf