diff --git a/src/datastore_mad/remotes/docker_downloader.sh b/src/datastore_mad/remotes/docker_downloader.sh index 2d7152465d..746a776866 100755 --- a/src/datastore_mad/remotes/docker_downloader.sh +++ b/src/datastore_mad/remotes/docker_downloader.sh @@ -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.*"` diff --git a/src/mad/sh/create_docker_image.sh b/src/mad/sh/create_docker_image.sh index e947949db2..d0268bcb54 100755 --- a/src/mad/sh/create_docker_image.sh +++ b/src/mad/sh/create_docker_image.sh @@ -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