Fix aesm check failure on SGX v1 machine
This commit is contained in:
parent
4d71868532
commit
7772411378
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
occlum_dir="$( cd "$( dirname "$this_dir/../../../" )" >/dev/null 2>&1 && pwd )"
|
occlum_dir="$( cd "$( dirname "$this_dir/../../../" )" >/dev/null 2>&1 && pwd )"
|
||||||
build_makefile=$occlum_dir/build/bin/occlum_build.mk
|
build_makefile=$occlum_dir/build/bin/occlum_build.mk
|
||||||
@ -122,8 +124,8 @@ check_aesm_service() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# AESM is not necessary for SGX2
|
# AESM is not necessary for SGX2
|
||||||
lscpu | grep sgx_lc > /dev/null 2>&1
|
lscpu | grep sgx_lc > /dev/null 2>&1 || ret=$?
|
||||||
if [ $? -eq 0 ]; then
|
if [[ $ret -eq 0 ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -595,8 +597,6 @@ cmd_gen_image_key() {
|
|||||||
cat /dev/urandom | tr -dc 'a-f0-9' | fold -w 32 | head -n 1 | sed -r 's/.{2}/&-/g; s/.$//' > $key_path
|
cat /dev/urandom | tr -dc 'a-f0-9' | fold -w 32 | head -n 1 | sed -r 's/.{2}/&-/g; s/.$//' > $key_path
|
||||||
}
|
}
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [[ ( "$#" < 1 ) ]] ; then
|
if [[ ( "$#" < 1 ) ]] ; then
|
||||||
report_arg_error "Error: no sub-command is given"
|
report_arg_error "Error: no sub-command is given"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user