1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

M #: replacing uuidgen

This commit is contained in:
Christian González 2020-05-25 17:39:14 +02:00
parent 08b2a512bb
commit 9a0b149a08
No known key found for this signature in database
GPG Key ID: BC941A50DF6A42EA
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ set -e -o pipefail
# format: image format e.g. raw or qcow2
# distro: base image distro to install contents
#-------------------------------------------------------------------------------
id=`uuidgen`
id=`echo "$RANDOM-$RANDOM-$RANDOM-$RANDOM-$RANDOM"`
sid=`echo $id | cut -d '-' -f 1`
url=`echo $MARKET_URL | grep -oP "^"docker://"\K.*"`

View File

@ -51,7 +51,7 @@ if [ ! -f "$tarball" ]; then
fi
# Check dockerdir is different than / and the directory name is an uuid
regex_uuid="^\{?[A-F0-9a-f]{8}-[A-F0-9a-f]{4}-[A-F0-9a-f]{4}-[A-F0-9a-f]{4}-[A-F0-9a-f]{12}\}?$"
regex_uuid="^\{?[0-9]+-[0-9]+-[0-9]+-[0-9]+-[0-9]+\}?$"
if [ ! -d $dockerdir ] || [[ ! $(basename $dockerdir) =~ $regex_uuid ]]; then
exit -1
fi