Merge branch '2.6.0/master'
This commit is contained in:
commit
5c18a0b5f5
|
@ -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,18 +88,26 @@ 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`
|
|
||||||
|
spin='-\|/'
|
||||||
|
i=0
|
||||||
|
while :
|
||||||
do
|
do
|
||||||
sleep 1
|
imgState=$(runOneCmd "oneimage" "show ${ISONAME}" | awk '{if ($1 == "STATE") {print $3}}')
|
||||||
#oneimage show ${ISONAME} | grep STATE | grep rdy &>/dev/null && break
|
if [[ ${imgState} == "lock" ]]
|
||||||
runOneCmd "oneimage" "show ${ISONAME}" | grep STATE | grep lock &>/dev/null || break
|
then
|
||||||
echo -n "Attente : "
|
i=$(( (i+1) %4 ))
|
||||||
runOneCmd "oneimage" "show ${ISONAME}" | grep STATE
|
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
|
done
|
||||||
rm -f "/tmp/eole-${VERSIONISO}-alternate-amd64.iso"
|
rm -f "/tmp/eole-${VERSIONISO}-alternate-amd64.iso"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue