Unverified Commit f092115e authored by Stan Kladko's avatar Stan Kladko Committed by GitHub

Create install-psw.patch

parent aa7c9839
diff --git a/linux/installer/bin/install-sgx-psw.bin.tmpl b/linux/installer/bin/install-sgx-psw.bin.tmpl
index 3510e97c..751831ab 100755
--- a/linux/installer/bin/install-sgx-psw.bin.tmpl
+++ b/linux/installer/bin/install-sgx-psw.bin.tmpl
@@ -30,34 +30,10 @@
#
#
-grep 'sgx\.ko$\|intel_sgx\.ko$' /lib/modules/$(uname -r)/modules.builtin &> /dev/null
-if [[ $? != "0" ]]; then
- /sbin/modinfo isgx &> /dev/null
- if [[ $? != "0" ]]; then
- /sbin/modinfo intel_sgx &> /dev/null
- if [[ $? != "0" ]]; then
- lsmod | grep 'isgx\|intel_sgx' &> /dev/null
- if [[ $? = "0" ]]; then
- echo "Warning: You did not follow the document to install the driver package."
- echo
- elif [[ ! -e /dev/isgx ]] && [[ ! -e /dev/sgx ]]; then
- echo -e "\033[31;49;1mWarning: You may need to activate the SGX module if SGX is enabled in the kernel (e.g., sudo modprobe sgx) or download and install the SGX driver if the kernel doesn't have SGX support.\033[39;49;0m"
- echo
- fi
- fi
- fi
-fi
-
set -e
PKG_NAME="Intel SGX PSW Package"
-if test $(id -u) -ne 0; then
- echo "Root privilege is required to install $PKG_NAME."
- exit 4
-fi
-
-
PKG_ARCH=@arch@
ARCH=$(uname -m)
diff --git a/linux/installer/common/libsgx-enclave-common/install.sh b/linux/installer/common/libsgx-enclave-common/install.sh
index 296879af..851d520b 100755
--- a/linux/installer/common/libsgx-enclave-common/install.sh
+++ b/linux/installer/common/libsgx-enclave-common/install.sh
@@ -33,11 +33,6 @@
set -e
-if test $(id -u) -ne 0; then
- echo "Root privilege is required."
- exit 1
-fi
-
SCRIPT_DIR=$(dirname "$0")
source ${SCRIPT_DIR}/installConfig
@@ -95,7 +90,7 @@ elif [ -d /etc/init/ ]; then
else
echo " failed."
echo "Unsupported platform - neither systemctl nor initctl is found."
- exit 5
+ retval=0
fi
if test $retval -ne 0; then
diff --git a/linux/installer/common/psw/install.sh b/linux/installer/common/psw/install.sh
index 59f3ed61..8ba940a3 100755
--- a/linux/installer/common/psw/install.sh
+++ b/linux/installer/common/psw/install.sh
@@ -96,7 +96,7 @@ elif [ -d /etc/init/ ]; then
else
echo " failed."
echo "Unsupported platform - neither systemctl nor initctl is found."
- exit 5
+ retval=0
fi
if test $retval -ne 0; then
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment