1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-06 12:58:18 +03:00

B #6012: Multiple fixes (#2375)

This commit is contained in:
Daniel Boca 2022-11-23 19:18:16 +01:00 committed by GitHub
parent f9fc65becc
commit 7e35c59135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,7 @@ img_raw="$dockerdir/img.raw"
img_qcow="$dockerdir/img.qcow"
# Trap for cleaning temporary directories
trap clean EXIT
trap clean EXIT && trap clean ERR
mkdir -p "$dockerdir"
mkdir -p "$dockerdir/mnt"
@ -158,12 +158,12 @@ if [ -z "$distro" ]; then
-e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
"$docker_hub" /etc/os-release)
distro=$(echo "$os_info" | grep "^ID=.*\n" | cut -d= -f 2 | xargs)
distro=$(echo "$os_info" | grep "^ID=" | cut -d= -f 2 | xargs)
version=$(echo "$os_info" | grep "VERSION_ID=" | cut -d= -f 2 | xargs)
fi
if [ -z "$distro" ]; then
echo "Cannot identified $docker_hub distribution" 1>&2
echo "Cannot identify $docker_hub distribution" 1>&2
exit 1
fi