Merge branch '2.6.0/master'

This commit is contained in:
Philippe Caseiro 2016-10-14 14:54:25 +02:00
commit 5c18a0b5f5
1 changed files with 18 additions and 16 deletions

View File

@ -80,13 +80,7 @@ echo
#***************************************************** #*****************************************************
if ! runOneCmd "oneimage" "show ${ISONAME}" &>/dev/null if ! runOneCmd "oneimage" "show ${ISONAME}" &>/dev/null
then then
echo "***** Téléchargement de ${ISONAME} *****" echo -ne "***** Création de l'image ${ISONAME} *****\n\n"
wget --output-document "/tmp/eole-${VERSIONISO}-alternate-amd64.iso" ${ISOURL}
echo "***** Création de ${ISONAME} *****"
if [ $? -ne 0 ]; then
echo "Erreur lors du téléchargement, Abandon"
exit 1
fi
FILE=$(mktemp) FILE=$(mktemp)
cat > ${FILE} <<EOF cat > ${FILE} <<EOF
@ -94,19 +88,27 @@ NAME="${ISONAME}"
TYPE="CDROM" TYPE="CDROM"
DESCRIPTION="${ISODESC}" DESCRIPTION="${ISODESC}"
DEV_PREFIX="hd" DEV_PREFIX="hd"
PATH="/tmp/eole-${VERSIONISO}-alternate-amd64.iso" PATH="${ISOURL}"
PERSISTENT="No" PERSISTENT="No"
EOF EOF
runOneCmd "oneimage" "create -d $(CreoleGet one_ds_iso_name) ${FILE}" runOneCmd "oneimage" "create -d $(CreoleGet one_ds_iso_name) ${FILE}"
/bin/rm -f ${FILE} /bin/rm -f ${FILE}
for i in `seq 60`
do spin='-\|/'
sleep 1 i=0
#oneimage show ${ISONAME} | grep STATE | grep rdy &>/dev/null && break while :
runOneCmd "oneimage" "show ${ISONAME}" | grep STATE | grep lock &>/dev/null || break do
echo -n "Attente : " imgState=$(runOneCmd "oneimage" "show ${ISONAME}" | awk '{if ($1 == "STATE") {print $3}}')
runOneCmd "oneimage" "show ${ISONAME}" | grep STATE if [[ ${imgState} == "lock" ]]
done then
i=$(( (i+1) %4 ))
printf "\rInitialisation en cours, merci de patienter [${spin:$i:1}] "
sleep 2
else
printf "\r Création terminée, l'image a le statut : ${imgState}\n"
break
fi
done
rm -f "/tmp/eole-${VERSIONISO}-alternate-amd64.iso" rm -f "/tmp/eole-${VERSIONISO}-alternate-amd64.iso"
else else
echo "***** ${ISONAME} existe déjà *****" echo "***** ${ISONAME} existe déjà *****"