#!/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=c8b8d7b37e8e697d448a8b9d3e688935 # 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 ;SJ+&>&`H`+336gwW*!ֲdۯg$d@BRw*AOY>r\෻65nogE^cw[/[{lG"ad?w_u5kGҪFcc{kt/.3?"麌,!n^F}>t(p8YސC<9\9ܱLu1#2ȱif<:Qćl7xBӦr8DV@+#VN:miC8Uat4zAvfQY!Ѷ25uD^A0t)6ĺ֩d<rlw7eh, 7t|o\Fc:3˞X׼lrY 98=K?0ixrnZK%~5YY򐏬 z,{_.'1d:@!k+cn vQ1por6ڮPh[f/ozHs/ ϼZuo{;mln s{oU,6[.;2ڛ'睛m8m,y @p1؝?'snI&!K[1, ,ٓ)ܔE%"M'llSң&?@U0dnBKm t/ x:_E#bVpfWw42b؇UV9dQ3.!e!lܭ1`.)ZJ ~b .@9ә렅oEw@Ŧ,(A* c~eD|ڇza=dpG"{l7+L|fXN P6:sLOqcs'ݱ vλݭݍ~C79۫1|w|_K% c1@I\c8{%<=~l?`A$;\d {}d dyM= `O O('Ӹ}wY@O-| `_z YQ7.cp g8[CHzH &5=ė/ac-~/_PhO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