#!/usr/bin/env bash # # Copyright (C) 2011-2021 Intel Corporation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # * Neither the name of Intel Corporation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # set -e PKG_NAME="Intel SGX Driver" if test $(id -u) -ne 0; then echo "Root privilege is required to install $PKG_NAME." exit 4 fi PATH=/usr/bin:/bin umask 022 DRIVERPKG=`mktemp -t sgx-driver-pkg.XXXXXX` DRIVER_TEMP_FOLDER=`mktemp -d sgx-driver-XXXXXX -p /tmp` trap "rm -fr $DRIVERPKG $DRIVER_TEMP_FOLDER 2>/dev/null; /bin/sed -i '/^isgx$/d' /etc/modules; exit 3" HUP INT QUIT TERM EXIT # The number of lines in this script (plus 1). Using this number to # calculate the start address of the payload. NR_SCRIPT_LINES=93 # Run /usr/bin/md5sum on the binary payload to get the MD5 check sum. CHKSUM=e28e784d09c8b4fafe13476737db69d1 # Get the install payload from this shell script. echo -n "Unpacking $PKG_NAME ..." tail -n +$NR_SCRIPT_LINES "$0" > $DRIVERPKG echo " done." echo -n "Verifying the integrity of the install package ..." if test $(md5sum $DRIVERPKG | awk '{print $1}') != $CHKSUM; then echo " The install package appears to be corrupted." exit 1 fi echo " done." echo "Installing $PKG_NAME ..." tar zxf $DRIVERPKG -C $DRIVER_TEMP_FOLDER >/dev/null 2>&1 retcode=$? # Save the return code # Clean-up the temporary tarball. rm -f $DRIVERPKG 2>/dev/null if test $retcode -ne 0; then echo " failed." exit 2 fi pushd $DRIVER_TEMP_FOLDER source scripts/installConfig make install popd ${SGX_PACKAGES_PATH}/${DRIVER_PKG_NAME}/scripts/install.sh rm -fr ${DRIVER_TEMP_FOLDER} trap - EXIT exit 0 ]$[ϙu%UvWN,WF{vWzcZ*~m|MkG+A i{Ϻ,ZZݮUjU8a֛XS&mԻfYDjZ~Y1§r.<=/OV0%\ӚXU"Gɜz3+I{k!ƶOsM 1-\\6;![|N" X&ЁWD[ u⸁e@X>Ye⥙[30A0ux!0]c1NGŒGfz@=Kنd )L$bZl5"wEVXB?D bpdLѐ@ PDŽQ6<܀,Fc L`w''4ʈ?,<4/sQLQ;^Jw9I4{rz6$gvKD`;(ǣaoג k_){E7 JVHݡ"%tQK鞖 p2a.$ґ32bOaG"}i0T4 ѠSeµٖ*@rwH3N hz]y$E%2)e$Dm)9D@`]TiO`*n6|Jf .> ,ӘPAsa ("Q+S۔qx.U.¶)*(4P1q3ܨضH T%4YxvDr {7-¯Es#ے(SmPOr >)'7ߧ_"D  7![ q=H?C.R喍g(l+Q5uwAJlbɲ_8"tb.t~FlˠO˄\Nr^ap=%:0DhK]rt$1 @@ u "TLܧ*MPL g(ģ42n I Qq^]Po{$5Rzb 6> "يdH'.PyP%& USwN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